Skip to content

Commit de8009a

Browse files
committed
build: only run push if stuff changed
1 parent edc1f11 commit de8009a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/xivlauncher.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,15 @@ jobs:
8383
run: |
8484
rsync -ahvP "$GITHUB_WORKSPACE"/github/{PKGBUILD,XIVLauncher.desktop,xivlauncher-core} "$GITHUB_WORKSPACE"/aur/
8585
rsync -ahvP "$GITHUB_WORKSPACE"/.SRCINFO "$GITHUB_WORKSPACE"/aur/.SRCINFO
86+
- name: Check git status
87+
id: gitstatus
88+
working-directory: "${{ github.workspace }}/aur"
89+
run: |
90+
test -z "$(git status --porcelain)" && echo "clean=1" >> "$GITHUB_OUTPUT" || echo "clean=0" >> "$GITHUB_OUTPUT"
8691
- name: Push
92+
if: success() && steps.gitstatus.outputs.clean == '0'
93+
working-directory: "${{ github.workspace }}/aur"
8794
run: |
88-
cd "$GITHUB_WORKSPACE"/aur
8995
git config user.email "cent@spline.de"
9096
git config user.name "cent"
9197
git add --all

0 commit comments

Comments
 (0)