Skip to content

support both arm64 and amd64 images #4

support both arm64 and amd64 images

support both arm64 and amd64 images #4

Workflow file for this run

name: Generate psibase-builder-ubuntu-2204 image
on:
workflow_dispatch:
push:
branches:
- main
- "release/*"
paths:
- "docker/ubuntu-2204-builder.Dockerfile"
- ".github/workflows/ubuntu-2204.yml"
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
paths:
- "docker/ubuntu-2204-builder.Dockerfile"
- ".github/workflows/ubuntu-2204.yml"
jobs:
ubuntu-2204-builder:
name: psibase-builder-ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository_owner }}/psibase-builder-ubuntu-2204"
TAGS="${IMAGE}:${{ github.sha }}"
echo ::set-output name=tags::${TAGS,,}
- name: Showtag
id: showtag
run: echo ${{ steps.prep.outputs.tags }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# with:
# platforms: 'arm64'
- name: Docker Buildx setup
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Login in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Image
uses: docker/build-push-action@v4
with:
context: .
push: true
file: docker/ubuntu-2204-builder.Dockerfile
tags: ${{ steps.prep.outputs.tags }}
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
outputs: type=image,annotation-index.org.opencontainers.image.description=Psibase build environment based on Ubuntu 22.04