Update scoop package #1
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: Update Scoop Bucket | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'zep.json' | |
| jobs: | |
| update-scoop: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout scoop bucket repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: zephyrus-development/scoop-zephyrus | |
| path: scoop-bucket | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Copy zep.json to scoop bucket | |
| run: | | |
| cp zep.json scoop-bucket/bucket/zep.json | |
| - name: Configure Git | |
| run: | | |
| cd scoop-bucket | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Commit and push changes | |
| run: | | |
| cd scoop-bucket | |
| if git diff --quiet bucket/zep.json; then | |
| echo "No changes to commit" | |
| else | |
| git add bucket/zep.json | |
| git commit -m "chore: sync zep.json from main repository" | |
| git push | |
| fi | |
| - name: Comment on commit | |
| if: failure() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '❌ Failed to update scoop bucket. Please check the workflow logs.' | |
| }) |