Skip to content

Merge pull request #20 from gofractally/more-rust-tooling #36

Merge pull request #20 from gofractally/more-rust-tooling

Merge pull request #20 from gofractally/more-rust-tooling #36

Workflow file for this run

name: Generate ubuntu-2004 images
env:
GITHUB_OUTPUT: ""
on:
push:
branches:
- main
paths:
- "docker/ubuntu-2004-builder.Dockerfile"
- ".github/workflows/ubuntu-2004.yml"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "docker/ubuntu-2004-builder.Dockerfile"
- ".github/workflows/ubuntu-2004.yml"
jobs:
ubuntu-2004-builder:
name: psibase-builder-ubuntu-2004
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-2004"
TAGS="${IMAGE}:${{ github.sha }}"
echo "tags=${TAGS,,}" >> $GITHUB_OUTPUT
- 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-2004-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 20.04 (image support for arm64 and amd64)