Skip to content

fix(ci-docker): switch to GitHub Actions cache to prevent runner disk… #292

fix(ci-docker): switch to GitHub Actions cache to prevent runner disk…

fix(ci-docker): switch to GitHub Actions cache to prevent runner disk… #292

Workflow file for this run

name: Docker CI
on:
pull_request:
branches: ["main", "release/**"]
paths:
["Dockerfile", "bin/**", "config/**", ".github/workflows/ci-docker.yml"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: blinklabs/cardano-node
permissions:
contents: read
jobs:
build:
strategy:
matrix:
arch: [amd64, arm64]
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 https://github.com/actions/checkout/releases/tag/v5.0.0
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 https://github.com/docker/setup-buildx-action/releases/tag/v3.11.1
- id: meta
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0 https://github.com/docker/metadata-action/releases/tag/v5.9.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
suffix=-${{ matrix.arch == 'arm64' && 'arm64v8' || 'amd64' }}
- name: Build Docker image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 https://github.com/docker/build-push-action/releases/tag/v6.18.0
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha,ref=buildx-cache-${{ matrix.arch }}-${{ steps.meta.outputs.tags | replace(':','-') | replace('/','-') }} # cache target for arch and sanitized tag

Check failure on line 43 in .github/workflows/ci-docker.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-docker.yml

Invalid workflow file

You have an error in your yaml syntax on line 43
cache-to: |
type=gha,mode=max,ref=buildx-cache-${{ matrix.arch }}-${{ steps.meta.outputs.tags | replace(':','-') | replace('/','-') }}