Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 27 additions & 52 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,32 @@
name: Docker Image CI
name: Docker

# Shared EthDevOps workflow: pushes docker.ethquokkaops.io/ethquokkaops/ethdevops/claper.
# Tags: branch ref, latest (main), semver from v* tags. Multi-arch; ERL_FLAGS works
# around a qemu segfault in the Erlang builder (see erlang/otp#6340).

on:
workflow_dispatch:
push:
branches: [ "main", "dev" ]
tags: ['v*']
branches: ["main", "dev"]
tags: ["v*"]
pull_request:
branches: ["main"]

jobs:

build:

runs-on: ubuntu-latest

env:
ImageOS: ubuntu20

steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/ethdevops/claper
tags: |
type=ref,event=branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: --debug
driver-opts: image=moby/buildkit:v0.9.1
- name: Log in to registry
# This is where you will update the PAT to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build and push Docker image
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_METADATA=${{ steps.meta.outputs.json }}
ERL_FLAGS=+JPperf true
call-docker-build:
permissions:
contents: read
packages: write
id-token: write
uses: EthDevOps/workflows/.github/workflows/basic-docker-build-openbao.yaml@main
with:
bao_role: ethquokkaops-claper-ci
bao_secret_path: secret/ethquokkaops/data/docker-registry/production/credentials/ethquokkaops/robot-claper
platforms: linux/amd64,linux/arm64
build_args: 'ERL_FLAGS=+JPperf true'
tags: |
type=ref,event=branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
Loading