Skip to content

Actions test

Actions test #2

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.SCOOP_UPDATE_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: Upload workflow log on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: workflow-failure-log
path: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}