Skip to content

Commit 46b566e

Browse files
authored
Update check-badges.yml
1 parent cd4ef6e commit 46b566e

File tree

1 file changed

+3
-44
lines changed

1 file changed

+3
-44
lines changed

.github/workflows/check-badges.yml

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check and Create PR for Badges
1+
name: Check and Update Badges
22

33
on:
44
schedule:
@@ -9,9 +9,6 @@ jobs:
99
check-badges:
1010
runs-on: ubuntu-22.04
1111

12-
outputs:
13-
branch_name: ${{ steps.set-branch-name.outputs.branch_name }}
14-
1512
steps:
1613
- name: Checkout repository
1714
uses: actions/checkout@v3
@@ -64,50 +61,12 @@ jobs:
6461
git config --local user.email "[email protected]"
6562
BRANCH_NAME="update-badges-${{ github.run_id }}"
6663
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
67-
echo "$BRANCH_NAME" > branch-name.txt
6864
git checkout -b $BRANCH_NAME
6965
git commit -m "Update badges.json with latest release URLs"
7066
git push origin HEAD
71-
echo "::set-output name=branch_name::$BRANCH_NAME"
7267
echo "::notice::Changes committed and branch pushed."
7368
74-
- name: Upload branch name artifact
69+
- name: Notify manual pull request needed
7570
if: env.skip != 'true'
76-
uses: actions/upload-artifact@v4
77-
with:
78-
name: branch-name
79-
path: branch-name.txt
80-
81-
create-pr:
82-
runs-on: ubuntu-22.04
83-
needs: check-badges
84-
if: needs.check-badges.outputs.branch_name != ''
85-
steps:
86-
- name: Checkout repository
87-
uses: actions/checkout@v3
88-
with:
89-
fetch-depth: 0
90-
91-
- name: Download branch name artifact
92-
uses: actions/download-artifact@v4
93-
with:
94-
name: branch-name
95-
96-
- name: Load branch name
9771
run: |
98-
BRANCH_NAME=$(cat branch-name.txt)
99-
echo "Loaded branch name: $BRANCH_NAME"
100-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
101-
102-
- name: Create Pull Request
103-
uses: peter-evans/create-pull-request@v5
104-
with:
105-
token: ${{ secrets.GITHUB_TOKEN }}
106-
base: gh-pages
107-
branch: ${{ env.BRANCH_NAME }}
108-
title: "Update badges.json"
109-
body: |
110-
This pull request updates `badges.json` with the latest release URLs.
111-
Please review and merge if everything looks correct.
112-
labels: "automated update"
113-
assignees: "Garlicrot"
72+
echo "A new branch '$BRANCH_NAME' was created. Please open a pull request manually."

0 commit comments

Comments
 (0)