Docker build CI triggered from @sveitser of ma/nitro-docker #3
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 | |
jobs: | |
docker: | |
name: Docker build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Docker BuildKit (buildx) | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Github Container Repo | |
uses: docker/login-action@v3 | |
# TODO: uncomment before merge | |
# if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate nitro-node docker metadata | |
uses: docker/metadata-action@v5 | |
id: nitro-node | |
with: | |
images: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node | |
- name: Build and push nitro docker | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
target: nitro-node | |
platforms: linux/amd64,linux/arm64 | |
# push: ${{ github.event_name != 'pull_request' }} | |
push: true # TODO: remove before merge | |
tags: ${{ steps.nitro-node.outputs.tags }} | |
labels: ${{ steps.nitro-node.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Generate nitro-node-dev docker metadata | |
uses: docker/metadata-action@v5 | |
id: nitro-node-dev | |
with: | |
images: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev | |
- name: Build and push nitro-node-dev docker | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
target: nitro-node-dev | |
platforms: linux/amd64,linux/arm64 | |
# push: ${{ github.event_name != 'pull_request' }} | |
push: true # TODO: remove before merge | |
tags: ${{ steps.nitro-node-dev.outputs.tags }} | |
labels: ${{ steps.nitro-node-dev.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |