Skip to content

Commit

Permalink
Properly mark github action as success if nothing has been published
Browse files Browse the repository at this point in the history
  • Loading branch information
Qubad786 committed Jul 8, 2024
1 parent 01638ca commit 36ec1b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/update_catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@ jobs:
- name: Publish catalog
run: |
/bin/bash -c "PWD=${pwd}; /usr/local/bin/apps_catalog_update publish --path $PWD"
- name: Check untracked files existence
run: echo "CHANGES=$(git -C ${pwd} --no-pager status --porcelain | wc -l)" >> "$GITHUB_ENV"

- uses: stefanzweifel/git-auto-commit-action@v4
if: env.CHANGES != '0'
with:
commit_message: "Publish new changes in catalog [skip ci]"
commit_user_name: sonicaj
commit_user_email: waqarsonic1@gmail.com
commit_author: sonicaj <waqarsonic1@gmail.com>
- name: Update catalog
if: env.CHANGES != '0'
run: |
/bin/bash -c "PWD=${pwd}; /usr/local/bin/apps_catalog_update update --path $PWD"
- uses: stefanzweifel/git-auto-commit-action@v4
if: env.CHANGES != '0'
with:
commit_message: "Update catalog changes [skip ci]"
commit_user_name: sonicaj
Expand Down

0 comments on commit 36ec1b8

Please sign in to comment.