Sync AUR Packages (Edge) #89
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: Sync AUR Packages (Edge) | |
| 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 (edge tier) | |
| run: | | |
| if [ -n "$PACKAGES" ]; then | |
| ./bin/sync-aur --tier edge $PACKAGES | |
| else | |
| ./bin/sync-aur --tier edge | |
| 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 (edge)' | |
| title: 'chore: sync AUR packages (edge)' | |
| body: | | |
| Automated AUR package sync for edge tier. | |
| Please review the changes before merging. | |
| branch: auto/sync-aur-edge | |
| delete-branch: true | |
| labels: automated | |
| reviewers: ryanrhughes | |
| - name: Notify Basecamp on failure | |
| if: failure() && env.BASECAMP_CHATBOT_URL != '' | |
| env: | |
| BASECAMP_CHATBOT_URL: ${{ secrets.BASECAMP_CHATBOT_URL }} | |
| run: | | |
| curl -s -o /dev/null \ | |
| -H "Content-Type: application/json" \ | |
| -d "$(jq -n --arg content \ | |
| "🔴 <strong>AUR sync failed (edge)</strong><br><a href=\"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\">View run</a>" \ | |
| '{content: $content}')" \ | |
| "$BASECAMP_CHATBOT_URL" |