From d05600ad5f392f00164990ea3b3cdff5dedc967c Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Thu, 19 Nov 2026 11:58:59 +0900 Subject: [PATCH 1/2] Load setup-cpp from build.yml's own commit build.yml is called from other repositories (x4 calls it at @main), but it used ./.github/actions/setup-cpp from the caller's workspace, copied from the caller's iris submodule. The workflow and the action it calls therefore came from different iris commits, and any change to their interface broke callers until they bumped the submodule. Check out .github/actions from job.workflow_repository at job.workflow_sha instead, so the action always matches the workflow. Callers no longer need a submodule bump to pick up CI changes. actionlint 1.7.12 does not yet know the job.workflow_* properties and reports them as undefined. --- .github/workflows/build.yml | 38 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f289583..bee0652 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,16 +72,21 @@ jobs: with: submodules: recursive - - name: Copy Local GitHub Actions - shell: bash - run: | - if [ -e modules/iris ]; then - cp -r modules/iris/.github/actions .github/ - fi + # Take the local actions from this workflow's own commit, not from the + # caller's checkout, so that callers in other repositories get the + # version this workflow was written against. + - name: Checkout CI Actions + uses: actions/checkout@v5 + with: + repository: ${{ job.workflow_repository }} + ref: ${{ job.workflow_sha }} + path: .iris-ci + sparse-checkout: .github/actions + persist-credentials: false - name: Setup Toolchain id: setup - uses: ./.github/actions/setup-cpp + uses: ./.iris-ci/.github/actions/setup-cpp with: os-name: ${{ inputs.os-name }} os-version: ${{ inputs.os-version }} @@ -148,16 +153,21 @@ jobs: with: submodules: recursive - - name: Copy Local GitHub Actions - shell: bash - run: | - if [ -e modules/iris ]; then - cp -r modules/iris/.github/actions .github/ - fi + # Take the local actions from this workflow's own commit, not from the + # caller's checkout, so that callers in other repositories get the + # version this workflow was written against. + - name: Checkout CI Actions + uses: actions/checkout@v5 + with: + repository: ${{ job.workflow_repository }} + ref: ${{ job.workflow_sha }} + path: .iris-ci + sparse-checkout: .github/actions + persist-credentials: false - name: Setup Toolchain id: setup - uses: ./.github/actions/setup-cpp + uses: ./.iris-ci/.github/actions/setup-cpp with: os-name: ${{ inputs.os-name }} os-version: ${{ inputs.os-version }} From 6c0e2a08b5045f30da9ef3174d216d04c3bbc255 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Thu, 19 Nov 2026 16:33:44 +0900 Subject: [PATCH 2/2] Drop the duplicate comment on the second Checkout CI Actions step --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bee0652..2395fc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -153,9 +153,6 @@ jobs: with: submodules: recursive - # Take the local actions from this workflow's own commit, not from the - # caller's checkout, so that callers in other repositories get the - # version this workflow was written against. - name: Checkout CI Actions uses: actions/checkout@v5 with: