Skip to content

Commit 3baf20a

Browse files
authored
change condition to run update-site workflow (#282)
* change condition to run update-site workflow Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com> * safeguard against failures caused by no files to commit Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com> --------- Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com>
1 parent d419a6a commit 3baf20a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/main_new_release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ jobs:
193193
uses: ./.github/workflows/generate_compatibility_tables.yml
194194

195195
update-site:
196-
needs: generate-compatibility-tables
196+
needs:
197+
- update-repo-files
198+
- generate-compatibility-tables
199+
if: ${{ !failure() && needs.update-repo-files.outputs.changes_made == 'true' }}
197200
uses: ./.github/workflows/update_site.yml
198201
secrets:
199202
CI_PUSH_TOKEN: ${{ secrets.OL_SITE_PUSH_TOKEN }}

.github/workflows/update_site.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ jobs:
5353
# TOKEN: ${{ secrets.CI_PUSH_TOKEN }}
5454
run: |
5555
git add -A
56+
if git diff --cached --quiet; then
57+
echo "No changes to commit, skipping push"
58+
exit 0
59+
fi
5660
git commit -sm "[bot] update compatibility tables with run data"
5761
# git remote set-url origin https://x-access-token:${TOKEN}@github.com/tnazarew/openlineage-site.git
5862
git push origin main

0 commit comments

Comments
 (0)