From ceffba6d58186668fc56caa4e6fa649edfb3f753 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sat, 13 Dec 2025 17:52:30 -0500 Subject: [PATCH] Add sync workflow --- .github/workflows/sync-aur.yml | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/sync-aur.yml diff --git a/.github/workflows/sync-aur.yml b/.github/workflows/sync-aur.yml new file mode 100644 index 0000000..efd3b22 --- /dev/null +++ b/.github/workflows/sync-aur.yml @@ -0,0 +1,58 @@ +name: Sync AUR Packages + +on: + schedule: + # Daily at 6 AM UTC + - cron: '0 6 * * *' + workflow_dispatch: + inputs: + packages: + description: 'Specific packages to sync (space-separated, leave empty for all)' + required: false + default: '' + +jobs: + sync: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Sync AUR packages + run: | + if [ -n "$PACKAGES" ]; then + ./bin/sync-aur $PACKAGES + else + ./bin/sync-aur + fi + env: + PACKAGES: ${{ github.event.inputs.packages }} + + - name: Check for changes + id: changes + run: | + if git diff --quiet; then + echo "has_changes=false" >> "$GITHUB_OUTPUT" + else + echo "has_changes=true" >> "$GITHUB_OUTPUT" + fi + + - name: Create Pull Request + if: steps.changes.outputs.has_changes == 'true' + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'chore: sync AUR packages' + title: 'chore: sync AUR packages' + body: | + Automated AUR package sync. + + Please review the changes before merging. + branch: auto/sync-aur + delete-branch: true + labels: automated + reviewers: ryanrhughes