Skip to content

Commit 588fc17

Browse files
committed
Fix workflow
1 parent 7b26ce5 commit 588fc17

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/update-version-info.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
permissions:
21+
actions: write
2122
contents: write
2223

2324
steps:
@@ -31,8 +32,10 @@ jobs:
3132
run: bash ./update_version_info.sh
3233

3334
- name: Commit and push changes
35+
id: push_changes
3436
run: |
3537
if git diff --quiet; then
38+
echo "pushed=false" >>"$GITHUB_OUTPUT"
3639
exit 0
3740
fi
3841
@@ -41,3 +44,15 @@ jobs:
4144
git add README.md versions/*.version versions/*.hash
4245
git commit -m "Update tracked upstream versions"
4346
git push
47+
echo "pushed=true" >>"$GITHUB_OUTPUT"
48+
49+
- name: Dispatch Release Packages
50+
if: steps.push_changes.outputs.pushed == 'true'
51+
run: |
52+
curl -fsSL \
53+
-X POST \
54+
-H "Accept: application/vnd.github+json" \
55+
-H "Authorization: Bearer $GITHUB_TOKEN" \
56+
-H "X-GitHub-Api-Version: 2022-11-28" \
57+
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/main.yml/dispatches" \
58+
-d '{"ref":"main"}'

0 commit comments

Comments
 (0)