Skip to content

manual_catalog_update #1

manual_catalog_update

manual_catalog_update #1

name: manual_catalog_update
concurrency:
group: manual_apps_catalog_update
on:
workflow_dispatch:
jobs:
publish_catalog:
runs-on: ubuntu-latest
container:
image: ghcr.io/truenas/apps_validation:latest
steps:
- uses: actions/checkout@v4
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@v4
if: env.CHANGES != '0'
with:
commit_message: "Publish new changes in catalog [skip ci]"
commit_user_name: sonicaj
commit_user_email: [email protected]
commit_author: sonicaj <[email protected]>
- name: Update catalog
run: |
/bin/bash -c "PWD=${pwd}; /usr/local/bin/apps_catalog_update update --path $PWD"
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update catalog changes [skip ci]"
commit_user_name: sonicaj
commit_user_email: [email protected]
commit_author: sonicaj <[email protected]>