Skip to content

Commit ff587c1

Browse files
authored
Update check-badges.yml
1 parent 8b1ee1d commit ff587c1

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

.github/workflows/check-badges.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,41 @@ on:
77

88
jobs:
99
check-badges:
10-
runs-on: ubuntu-22.04 # Explicit runner version to prevent future issues
10+
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0
17-
- run: echo "::notice::Repository checked out successfully."
1817

1918
- name: Switch to gh-pages branch
20-
run: git checkout gh-pages
21-
- run: echo "::notice::Switched to gh-pages branch."
19+
run: |
20+
git checkout gh-pages
21+
echo "::notice::Switched to gh-pages branch."
2222
2323
- name: Set up Node.js
2424
uses: actions/setup-node@v3
2525
with:
2626
node-version: '18'
27-
- run: echo "::notice::Node.js set up successfully."
27+
run: echo "::notice::Node.js set up successfully."
2828

2929
- name: Install dependencies
30-
run: npm install axios
31-
- run: echo "::notice::Dependencies installed successfully."
30+
run: |
31+
npm install axios
32+
echo "::notice::Dependencies installed successfully."
3233
3334
- name: Check and update badges.json
3435
env:
3536
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
run: node check-badges.js
37-
- run: echo "::notice::Badge check completed."
37+
run: |
38+
node check-badges.js
39+
echo "::notice::Badge check completed."
3840
3941
- name: Clean up untracked files
4042
run: |
4143
rm -rf node_modules package-lock.json package.json
42-
- run: echo "::notice::Cleaned up untracked files."
44+
echo "::notice::Cleaned up untracked files."
4345
4446
- name: Check for changes
4547
id: check_changes
@@ -50,28 +52,29 @@ jobs:
5052
echo "skip=true" >> $GITHUB_ENV
5153
exit 0
5254
fi
53-
- run: echo "::notice::Changes detected, proceeding to create PR." || true
55+
echo "Changes detected, proceeding to create PR."
5456
5557
- name: Set Git user identity
5658
if: env.skip != 'true'
5759
run: |
5860
git config --local user.name "GitHub Actions Bot"
5961
git config --local user.email "[email protected]"
60-
- run: echo "::notice::Git user identity set." || true
62+
echo "::notice::Git user identity set."
6163
6264
- name: Create a new branch for the PR
6365
if: env.skip != 'true'
6466
run: |
6567
git checkout -b update-badges-${{ github.run_id }}
6668
git commit -m "Update badges.json with latest release URLs"
67-
- run: echo "::notice::New branch created for PR." || true
69+
echo "::notice::New branch created for PR."
6870
6971
- name: Push the new branch
7072
if: env.skip != 'true'
7173
env:
7274
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73-
run: git push origin HEAD
74-
- run: echo "::notice::Branch pushed successfully." || true
75+
run: |
76+
git push origin HEAD
77+
echo "::notice::Branch pushed successfully."
7578
7679
- name: Create a pull request
7780
if: env.skip != 'true'
@@ -86,4 +89,4 @@ jobs:
8689
Please review and merge if everything looks correct.
8790
labels: "automated update"
8891
assignees: "Garlicrot"
89-
- run: echo "::notice::Pull request created successfully." || true
92+
run: echo "::notice::Pull request created successfully."

0 commit comments

Comments
 (0)