Skip to content

Commit 4bc8abb

Browse files
workflow fix
1 parent b9f6a24 commit 4bc8abb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/sync-element-web.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
- name: Checkout repo
1313
uses: actions/checkout@v4
1414
with:
15-
fetch-depth: 0 # ensures full history for commits
15+
fetch-depth: 0
16+
persist-credentials: true
1617

1718
- name: Get latest release info
1819
id: release
@@ -31,7 +32,6 @@ jobs:
3132
- name: Run rename/move script
3233
run: |
3334
chmod +x ./scripts/rename.sh
34-
# Make sure the folder exists
3535
mkdir -p ./processed
3636
./scripts/rename.sh ./upstream-release ./processed
3737
@@ -41,12 +41,16 @@ jobs:
4141
4242
- name: Commit and push
4343
run: |
44-
cd $GITHUB_WORKSPACE
4544
git config user.name "github-actions"
4645
git config user.email "[email protected]"
47-
git add .
48-
git commit -m "Update to ${{ steps.release.outputs.tag }}" || echo "No changes to commit"
49-
git push origin main
46+
# Only commit if there are changes
47+
if [ -n "$(git status --porcelain)" ]; then
48+
git add .
49+
git commit -m "Update to ${{ steps.release.outputs.tag }}"
50+
git push origin main
51+
else
52+
echo "No changes to commit"
53+
fi
5054
5155
- name: Notify via GitHub issue
5256
uses: peter-evans/create-issue-from-file@v5

0 commit comments

Comments
 (0)