Update updates-patch-minor (#4940) #2778
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: catalog_update | |
| concurrency: | |
| group: apps_catalog_update | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| workflow_dispatch: | |
| jobs: | |
| publish_catalog: | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/truenas/apps_validation:latest | |
| env: | |
| FAKE_ENV: 1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PAT }} | |
| - name: Add catalog json as a safe directory | |
| run: | | |
| /bin/bash -c "PWD=${pwd}; git config --global --add safe.directory $PWD" | |
| - 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@v7 | |
| 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> | |
| # Without this, the last_updated field will be updated for ALL apps, not just the ones that changed | |
| skip_fetch: true | |
| - 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@v7 | |
| if: env.CHANGES != '0' | |
| with: | |
| commit_message: "Update catalog changes [skip ci]" | |
| commit_user_name: sonicaj | |
| commit_user_email: waqarsonic1@gmail.com | |
| commit_author: sonicaj <waqarsonic1@gmail.com> |