@@ -269,10 +269,46 @@ jobs:
269269 tags : |
270270 ${{ env.INT_TEST_CONTRACTS_IMAGE }}
271271
272+ publish-nitro-image :
273+ name : Publish Nitro Image
274+ runs-on : ubuntu-latest
275+ permissions :
276+ contents : read
277+ packages : write
278+ steps :
279+ - name : Set Nitro image
280+ run : |
281+ echo "NITRO_SOURCE_IMAGE=offchainlabs/nitro-node:v3.9.5-66e42c4" >> "$GITHUB_ENV"
282+ echo "NITRO_IMAGE=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/nitro-node:v3.9.5-66e42c4" >> "$GITHUB_ENV"
283+
284+ - name : Set up Docker Buildx
285+ uses : docker/setup-buildx-action@v3
286+
287+ - name : Log in to GHCR
288+ uses : docker/login-action@v3
289+ with :
290+ registry : ghcr.io
291+ username : ${{ github.actor }}
292+ password : ${{ secrets.GITHUB_TOKEN }}
293+
294+ - name : Check Nitro image
295+ id : check-image
296+ run : |
297+ if docker manifest inspect "${NITRO_IMAGE}" >/dev/null 2>&1; then
298+ echo "exists=true" >> "$GITHUB_OUTPUT"
299+ else
300+ echo "exists=false" >> "$GITHUB_OUTPUT"
301+ fi
302+
303+ - name : Mirror Nitro image to GHCR
304+ if : steps.check-image.outputs.exists != 'true'
305+ run : docker buildx imagetools create --tag "${NITRO_IMAGE}" "${NITRO_SOURCE_IMAGE}"
306+
272307 test-integration-anvil :
273308 name : Test (Integration Anvil)
274309 needs :
275310 - publish-int-test-contracts-image
311+ - publish-nitro-image
276312 runs-on : ubuntu-latest
277313 permissions :
278314 contents : read
@@ -285,7 +321,7 @@ jobs:
285321 run : |
286322 echo "INT_TEST_CONTRACTS_IMAGE=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/chain-sdk-int-test-contracts:v3.2.0-2f747c7-v1.2.5-5975d8f73608" >> "$GITHUB_ENV"
287323 echo "ANVIL_IMAGE=ghcr.io/foundry-rs/foundry:v1.3.1" >> "$GITHUB_ENV"
288- echo "NITRO_IMAGE=offchainlabs /nitro-node:v3.9.5-66e42c4" >> "$GITHUB_ENV"
324+ echo "NITRO_IMAGE=ghcr.io/${GITHUB_REPOSITORY_OWNER,,} /nitro-node:v3.9.5-66e42c4" >> "$GITHUB_ENV"
289325
290326 - name : Log in to GHCR
291327 uses : docker/login-action@v3
0 commit comments