From 5d7bf0483a934d897164c937657b69ed4f6c071a Mon Sep 17 00:00:00 2001 From: kitsuyui Date: Tue, 9 Jun 2026 23:09:23 +0900 Subject: [PATCH 1/4] Add platform matrix and binary assertion to example job Extends the example job to run on both ubuntu-latest and macos-latest, covering Linux-X64 and macOS-ARM64 platform branches declared in action.yml. Adds a verification step after the action runs to assert that the gitignore.in binary is accessible in PATH, catching silent regressions where the download or PATH registration fails without exiting non-zero. --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4896cc2..f6dcf54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -158,15 +158,22 @@ jobs: grep '^changed=true$' "${GITHUB_OUTPUT}" example: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + name: test (${{ matrix.os }}) timeout-minutes: 15 - name: test permissions: contents: write pull-requests: write + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: ./ + - name: verify binary is accessible after action + run: gitignore.in --version example-pinned-boilerplates: runs-on: ubuntu-latest From 3174e7a9bd320d2a21ae6c844089e3788864c261 Mon Sep 17 00:00:00 2001 From: kitsuyui Date: Wed, 10 Jun 2026 07:06:13 +0900 Subject: [PATCH 2/4] Fix macOS job failure: update install-gibo to cross-platform version install-gibo@v0.1.0 (9e7dba9) hardcodes gibo_Linux_x86_64.tar.gz for all platforms. On macOS-ARM64 runners this downloads a Linux x86_64 binary that cannot execute, causing exit code 126. Update the pin to 190df5c (current main) which selects the correct platform-specific archive based on RUNNER_OS and RUNNER_ARCH. --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b092214..0e1cafa 100644 --- a/action.yml +++ b/action.yml @@ -83,7 +83,7 @@ runs: ref: ${{ inputs.base_branch }} path: repository - - uses: gitignore-in/install-gibo@9e7dba9e59f184b41f542669b0864687a6f69b45 # v0.1.0 + - uses: gitignore-in/install-gibo@190df5cc5be7f64b8364a04f9c84e2cfa7b1cd32 with: boilerplates-ref: ${{ inputs.boilerplates_ref }} - run: | From a117d4586afd438f2e3658db8f83af0a99e9fe30 Mon Sep 17 00:00:00 2001 From: kitsuyui Date: Fri, 12 Jun 2026 11:57:32 +0900 Subject: [PATCH 3/4] Add test aggregation gate to satisfy required status check context The platform matrix renamed the example job to `test (ubuntu-latest)` / `test (macos-latest)`, so the `default-branch-baseline` ruleset's required `test` context was no longer produced and `required-status-checks` failed. Add a small aggregation job whose id is `test`, gated on the example matrix via `needs`, so a single `test` status context is produced again. With `if: always()` it always reports and is green only when every matrix leg succeeds, keeping the new macOS/ubuntu coverage while restoring the required context name. --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6dcf54..dc91546 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -175,6 +175,24 @@ jobs: - name: verify binary is accessible after action run: gitignore.in --version + # Aggregation gate that produces the bare `test` status context required by + # the `default-branch-baseline` ruleset. The platform matrix above reports as + # `test (ubuntu-latest)` / `test (macos-latest)`, so this job re-exposes a + # single `test` context that is green only when every matrix leg succeeds. + test: + needs: + - example + if: ${{ always() }} + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + steps: + - name: example matrix succeeded on all platforms + run: | + result='${{ needs.example.result }}' + test "${result}" = success + example-pinned-boilerplates: runs-on: ubuntu-latest timeout-minutes: 15 From 64c752b6db0c0b37892b1c5a89cbfb92abdecc20 Mon Sep 17 00:00:00 2001 From: kitsuyui Date: Fri, 12 Jun 2026 12:08:03 +0900 Subject: [PATCH 4/4] Run required-status-checks after the test gate to avoid a context race MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `test` aggregation gate is gated on the example matrix via `needs`, so its status context is not registered until the matrix finishes. The guard job ran concurrently and queried `gh pr checks` before `test` existed, reporting it as missing. Make the guard `needs: [test]` (with `if: always()`) so it evaluates after every required context — including the gated `test` — has registered. --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc91546..1e87698 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,12 @@ jobs: required-status-checks: runs-on: ubuntu-latest timeout-minutes: 5 + # Wait for the `test` aggregation gate: a `needs`-gated job does not register + # its status context until its dependencies finish, so this guard must run + # after it or it races and reports `test` as missing. + needs: + - test + if: ${{ always() }} permissions: checks: read contents: read