Docker build CI triggered from @Zaptoss of #10
This file contains hidden or 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
| # Build the nitro-node images on AMD64 hosts. | |
| # After building, the images are merged together to make a multiplatform image. | |
| 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: | |
| tags: | |
| - "v*" | |
| branches: | |
| - integration | |
| - celestia-integration | |
| - release-tee-caff-node | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| docker_build: | |
| strategy: | |
| matrix: | |
| platform: [linux/amd64] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: true | |
| - uses: cargo-bins/cargo-binstall@main | |
| - name: Make more disk space available on public runner | |
| run: | | |
| # rmz seems to be faster at deleting files than rm | |
| cargo binstall -y --version 2.2.0 rmz | |
| sudo mv /home/runner/.cargo/bin/rmz /usr/local/bin/rmz | |
| echo "Available storage before:" | |
| sudo df -h | |
| echo | |
| sudo rmz -f $AGENT_TOOLSDIRECTORY | |
| sudo rmz -f /opt/az | |
| sudo rmz -f /opt/ghc | |
| sudo rmz -f /opt/google | |
| sudo rmz -f /opt/microsoft | |
| sudo rmz -f /opt/pipx | |
| sudo rmz -f /usr/lib/mono | |
| sudo rmz -f /usr/local/julia* | |
| sudo rmz -f /usr/local/lib/android | |
| sudo rmz -f /usr/local/lib/node_modules | |
| sudo rmz -f /usr/local/share/boost | |
| sudo rmz -f /usr/local/share/chromium | |
| sudo rmz -f /usr/local/share/powershell | |
| sudo rmz -f /usr/share/az_* | |
| sudo rmz -f /usr/share/dotnet | |
| sudo rmz -f /usr/share/gradle-* | |
| sudo rmz -f /usr/share/swift | |
| echo "Available storage after:" | |
| sudo df -h | |
| echo | |
| - name: Fix submodule permissions check | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - 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 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node | |
| tags: | | |
| type=ref,event=pr | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=sha | |
| - name: Build & push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| target: nitro-node | |
| platforms: linux/amd64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| - name: Check available space after CI run | |
| if: "!cancelled()" | |
| run: | | |
| sudo df -h |