From e50dd393de3905281f92e2ed59a1edf658fd7d3c Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:13:02 +0000 Subject: [PATCH 1/7] fix: handle publish with restricted token --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa5e892cd..bd0ea131c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,13 +43,6 @@ jobs: if: ${{ github.event_name == 'push' }} uses: actions/checkout@master - - name: Checkout gh-pages - if: ${{ github.event_name == 'push' }} - uses: actions/checkout@master - with: - path: gh-pages - ref: gh-pages - - name: Checkout agbcc uses: actions/checkout@master with: @@ -112,7 +105,34 @@ jobs: python3 ../scripts/progress.py shield-json -f mb_chao_garden.map > ../gh-pages/reports/progress-mb_chao_garden-shield.json python3 ../scripts/progress.py shield-json -m -f mb_chao_garden.map > ../gh-pages/reports/progress-mb_chao_garden-shield-matching.json - - name: Update reports + - name: Upload progress + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + uses: actions/upload-artifact@v7 + with: + path: | + reports + maps + + publish-progress: + runs-on: ubuntu-24.02 + needs: [build-gba] + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + permissions: + contents: write + steps: + - name: Checkout gh-pages + uses: actions/checkout@master + with: + path: gh-pages + ref: gh-pages + - name: Download progress + uses: actions/download-artifact@v7 + with: + path: | + reports + maps + - run: git status + - name: Publish reports if: ${{ github.event_name == 'push' }} uses: EndBug/add-and-commit@v7 with: From a3ececd244952f18f485caa34817a9c837fa82d0 Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:28:33 +0000 Subject: [PATCH 2/7] oops --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd0ea131c..64dd26f75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,7 +114,7 @@ jobs: maps publish-progress: - runs-on: ubuntu-24.02 + runs-on: ubuntu-24.04 needs: [build-gba] if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} permissions: From d536eff036c4ec8a6586b2664f7f97f35f57cfac Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:29:30 +0000 Subject: [PATCH 3/7] pages --- .github/workflows/build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64dd26f75..6b4eab7c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,8 +110,7 @@ jobs: uses: actions/upload-artifact@v7 with: path: | - reports - maps + gh-pages publish-progress: runs-on: ubuntu-24.04 @@ -129,8 +128,7 @@ jobs: uses: actions/download-artifact@v7 with: path: | - reports - maps + gh-pages - run: git status - name: Publish reports if: ${{ github.event_name == 'push' }} From c6ab7c855183a3e10e68ba69b31a37b8b6ac2152 Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:33:33 +0000 Subject: [PATCH 4/7] repoerts --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b4eab7c1..bb942b761 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,6 @@ jobs: cd chao_garden && python3 ../scripts/progress.py -f mb_chao_garden.map text - name: Generate reports - if: ${{ github.event_name == 'push' }} run: | mkdir -p gh-pages/reports mkdir -p gh-pages/maps @@ -88,7 +87,6 @@ jobs: cp sa2.map gh-pages/maps/${GITHUB_SHA}.map - name: Generate reports (Collect Rings) - if: ${{ github.event_name == 'push' }} run: | cd multi_boot/roms/collect_rings python3 ../../../scripts/progress.py csv -f collect_rings.map >> ../../../gh-pages/reports/progress-collect_rings-nonmatching.csv @@ -97,7 +95,6 @@ jobs: python3 ../../../scripts/progress.py shield-json -m -f collect_rings.map > ../../../gh-pages/reports/progress-collect_rings-shield-matching.json - name: Generate reports (Chao Garden) - if: ${{ github.event_name == 'push' }} run: | cd chao_garden python3 ../scripts/progress.py csv -f mb_chao_garden.map >> ../gh-pages/reports/progress-mb_chao_garden-nonmatching.csv From d8242e4a652aa08b0b8e04d12b27e92b2609eb94 Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:37:27 +0000 Subject: [PATCH 5/7] list --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb942b761..018b46b08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,7 +126,7 @@ jobs: with: path: | gh-pages - - run: git status + - run: ls -lah - name: Publish reports if: ${{ github.event_name == 'push' }} uses: EndBug/add-and-commit@v7 From 6d2a01ba5b2fcabf47f9f05a9b59f063d3f5a44f Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:42:47 +0000 Subject: [PATCH 6/7] fix --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 018b46b08..72a04cd0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,8 +110,10 @@ jobs: gh-pages publish-progress: + name: Publish progress runs-on: ubuntu-24.04 needs: [build-gba] + # Only able to run from repo pull requests (by maintainers, or on the main branch via push) if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} permissions: contents: write @@ -126,7 +128,9 @@ jobs: with: path: | gh-pages - - run: ls -lah + - run: | + cd gh-pages + ls -lah - name: Publish reports if: ${{ github.event_name == 'push' }} uses: EndBug/add-and-commit@v7 From 8a537a73b67d19c7049b6a4ad2501e9c59dce6fb Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 10 Mar 2026 23:49:00 +0000 Subject: [PATCH 7/7] one more time --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72a04cd0a..1aea02516 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: gh-pages - run: | cd gh-pages - ls -lah + git status - name: Publish reports if: ${{ github.event_name == 'push' }} uses: EndBug/add-and-commit@v7