Skip to content

Commit 2f5d4e3

Browse files
committed
fix: trigger release workflow explicitly after version bump
1 parent 8c3b84a commit 2f5d4e3

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/update-appversion.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
contents: write
9+
actions: write
910

1011
jobs:
1112
update:
@@ -38,8 +39,20 @@ jobs:
3839
echo "appVersion: ${APP_VERSION}"
3940
4041
- name: Commit and push
42+
id: commit
4143
run: |
4244
git add charts/logtide/Chart.yaml
43-
git diff --staged --quiet && echo "no changes, skipping" && exit 0
44-
git commit -m "bump to logtide v${{ github.event.client_payload.version }}"
45-
git push origin main
45+
if git diff --staged --quiet; then
46+
echo "no changes, skipping"
47+
echo "changed=false" >> $GITHUB_OUTPUT
48+
else
49+
git commit -m "bump to logtide v${{ github.event.client_payload.version }}"
50+
git push origin main
51+
echo "changed=true" >> $GITHUB_OUTPUT
52+
fi
53+
54+
- name: Trigger release workflow
55+
if: steps.commit.outputs.changed == 'true'
56+
run: gh workflow run release.yaml --ref main
57+
env:
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)