Skip to content

Commit e027d5f

Browse files
authored
Update update-readme.yml
1 parent d0a85d2 commit e027d5f

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

.github/workflows/update-readme.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,36 +46,20 @@ jobs:
4646
node update-readme.js parsed-badges.json
4747
if [ $? -eq 0 ]; then
4848
echo "changes-found=true" >> $GITHUB_ENV
49+
echo "changes-found=true" >> $GITHUB_OUTPUT
4950
else
5051
echo "changes-found=false" >> $GITHUB_ENV
52+
echo "changes-found=false" >> $GITHUB_OUTPUT
5153
fi
5254
echo "::notice::Checked and updated README if changes were found."
5355
54-
- name: Commit changes and create a new branch
55-
if: env.changes-found == 'true'
56-
run: |
57-
git config --local user.name "GitHub Actions Bot"
58-
git config --local user.email "[email protected]"
59-
BRANCH_NAME="update-readme-${{ github.run_id }}"
60-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
61-
echo "$BRANCH_NAME" > branch-name.txt
62-
git checkout -b $BRANCH_NAME
63-
git add README.md
64-
git commit -m "Update README with latest download URLs"
65-
git push origin HEAD
66-
echo "::notice::Changes committed and branch pushed."
67-
68-
- name: Upload branch name artifact
69-
if: env.changes-found == 'true'
70-
uses: actions/upload-artifact@v4
71-
with:
72-
name: branch-name
73-
path: branch-name.txt
56+
outputs:
57+
changes-found: ${{ steps.update-readme.outputs.changes-found }}
7458

7559
create-pr:
7660
runs-on: ubuntu-22.04
7761
needs: check-and-update-readme
78-
if: always() && env.changes-found == 'true'
62+
if: needs.check-and-update-readme.outputs.changes-found == 'true'
7963
steps:
8064
- name: Download branch name artifact
8165
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)