Docker build CI triggered from @sveitser of ma/nitro-docker #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a simpler version of the upstream `docker.yml`. | ||
# | ||
# The differences are: | ||
# - Uses GHA docker cache. | ||
# - Does not export the wavm module root as artifact. | ||
name: Espresso Docker build CI | ||
run-name: Docker build CI triggered from @${{ github.actor }} of ${{ github.head_ref }} | ||
on: | ||
workflow_dispatch: | ||
merge_group: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- integration | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
env: | ||
NITRO_IMAGE: "ghcr.io/espressosystems/nitro-espresso-integration/nitro-node" | ||
NITRO_DEV_IMAGE: "ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev" | ||
jobs: | ||
docker_build: | ||
strategy: | ||
matrix: | ||
platform: [ "linux/amd64", "linux/arm64" ] | ||
include: | ||
- platform: "linux/amd64" | ||
runs-on: "ubuntu-latest" | ||
- platform: "linux/arm64" | ||
runs-on: "ARM64" | ||
runs-on: [ "${{ matrix.runs-on }}" ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Github Container Repo | ||
uses: docker/login-action@v3 | ||
# if: github.event_name != 'pull_request' | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build nitro-node image | ||
uses: ./.github/actions/docker-image | ||
with: | ||
images: ${{ env.NITRO_IMAGE }} | ||
target: nitro-node | ||
platforms: ${{ matrix.platform }} | ||
- name: Build nitro-node-dev image | ||
uses: ./.github/actions/docker-image | ||
with: | ||
images: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev | ||
target: nitro-node-dev | ||
platforms: ${{ matrix.platform }} | ||
# For documentation refer to | ||
# https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners | ||
merge_docker_images: | ||
needs: | ||
- docker_build | ||
strategy: | ||
matrix: | ||
target: [ "nitro-node", "nitro-node-dev" ] | ||
include: | ||
- target: "nitro-node" | ||
image: "{{ env.NITRO_IMAGE }}" | ||
- target: "nitro-node-dev" | ||
image: "${{ env.NITRO_DEV_IMAGE }}" | ||
Check failure on line 83 in .github/workflows/espresso-docker.yml GitHub Actions / Espresso Docker build CIInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Github Container Repo | ||
uses: docker/login-action@v2 | ||
# if: github.event_name != 'pull_request' | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
# Merge nitro-node images | ||
- name: Download digests | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: "${{ matrix.target }}-digests" | ||
path: /tmp/digests | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ matrix.image }} | ||
- name: Create manifest list and push | ||
working-directory: /tmp/digests | ||
run: | | ||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
$(printf '${{ matrix.image }}@sha256:%s ' *) | ||
- name: Inspect image | ||
run: | | ||
docker buildx imagetools inspect ${{ matrix.image }}:${{ steps.meta.outputs.version }} |