-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.56 KB
/
check_runner_update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Detect Runner Change
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
detect-runner-change:
runs-on: ubuntu-latest
steps:
- name: Get runner details
run: |
echo "Runner OS: ${{ runner.os }}" > runner_info.txt
echo "Runner Arch: ${{ runner.arch }}" >> runner_info.txt
echo "Operating System and Version:" >> runner_info.txt
uname -srvpio >> runner_info.txt
echo "Distribution and Version:" >> runner_info.txt
lsb_release -a || cat /etc/os-release >> runner_info.txt
- name: Download previous runner info
id: download-artifact4
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: check_runner_update.yaml
workflow_search: true
workflow_conclusion: ""
name: runner-info-artifact
path: ./previous_runner_info
search_artifacts: true
if_no_artifact_found: fail
- name: Compare with previous runner details
id: check
run: |
if [ -f ./previous_runner_info/runner_info.txt ]; then
echo "Comparing with previous runner info..."
diff runner_info.txt ./previous_runner_info/runner_info.txt || exit 1
else
echo "No previous runner info found."
fi
- name: Save runner info
if: always()
uses: actions/upload-artifact@v4
with:
name: runner-info-artifact
path: ./runner_info.txt
retention-days: 2