Merge pull request #11 from Phqen1x/add-lemon-zest #24
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: Build apps.json | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'apps/**' | |
| - 'pinned.json' | |
| - 'scripts/build.py' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'apps/**' | |
| - 'pinned.json' | |
| - 'scripts/build.py' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Run build script | |
| run: python scripts/build.py | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| if git diff --quiet apps.json; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push apps.json | |
| if: github.event_name == 'push' && steps.check_changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add apps.json | |
| git commit -m "Auto-generate apps.json" | |
| git push | |
| - name: Upload apps.json artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: apps-json | |
| path: apps.json |