From db24d78b740a453eac77d8da73b4cec6a9fa413c Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:09:52 -0400 Subject: [PATCH 1/3] fix: add frontend build step to generate-contacts workflow --- .github/workflows/generate-contacts.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-contacts.yml b/.github/workflows/generate-contacts.yml index 31f55bc..c911848 100644 --- a/.github/workflows/generate-contacts.yml +++ b/.github/workflows/generate-contacts.yml @@ -25,7 +25,18 @@ jobs: uses: actions/setup-go@v5 with: go-version: '1.26.1' - + + - name: Set up Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Build frontend + run: | + cd frontend + bun install + bun run build + - name: Cache RadioID.net contacts uses: actions/cache@v4 id: cache-radioid From 141388736afa82b5b39877b21c510d653d5697ef Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:12:20 -0400 Subject: [PATCH 2/3] feat: create PR instead of direct commit for generated contacts --- .github/workflows/generate-contacts.yml | 52 ++++++++++++++++--------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/workflows/generate-contacts.yml b/.github/workflows/generate-contacts.yml index c911848..a8ec01c 100644 --- a/.github/workflows/generate-contacts.yml +++ b/.github/workflows/generate-contacts.yml @@ -73,22 +73,38 @@ jobs: fi done - - name: Check for changes - id: check-changes - run: | - git add generated/ - if git diff --cached --quiet; then - echo "No changes to commit" - echo "changed=false" >> $GITHUB_OUTPUT - else - echo "Changes detected" - echo "changed=true" >> $GITHUB_OUTPUT - fi - - - name: Commit and push generated contacts - if: steps.check-changes.outputs.changed == 'true' + - name: Create Pull Request + id: create-pr + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Update filtered contact lists" + title: "Auto: Update filtered contact lists" + body: | + This PR was automatically generated by the contact list workflow. + + ## Changes + - Updated contact lists based on filter files in `filters/` + - Source: RadioID.net user.csv + - Triggered by: ${{ github.event_name }} + + ## Files Changed + Files in `generated/` directory have been updated. + + ## Review Checklist + - [ ] Verify contact counts are reasonable + - [ ] Check for unexpected changes + - [ ] Confirm filter files are correct + branch: auto/update-contacts-${{ github.run_id }} + delete-branch: true + add-paths: | + generated/*.csv + + - name: Summary + if: steps.create-pr.outputs.pull-request-number != '' run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git commit -m "Update filtered contact lists [skip ci]" - git push + echo "## Pull Request Created" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "- **PR #${{ steps.create-pr.outputs.pull-request-number }}**: ${{ steps.create-pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Please review the generated contact lists before merging." From 89334ada03176d8a3d685e2f3b6441d33eabf953 Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:12:49 -0400 Subject: [PATCH 3/3] chore: add required permissions for PR creation from actions --- .github/workflows/generate-contacts.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-contacts.yml b/.github/workflows/generate-contacts.yml index a8ec01c..e2439af 100644 --- a/.github/workflows/generate-contacts.yml +++ b/.github/workflows/generate-contacts.yml @@ -14,7 +14,10 @@ jobs: generate: name: Generate Filtered Contact Lists runs-on: ubuntu-latest - + permissions: + contents: write # Required to push commits to new branch + pull-requests: write # Required to create PRs + steps: - name: Checkout repository uses: actions/checkout@v4