Skip to content

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

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

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

Workflow file for this run

name: Generate ubuntu-2204 images
env:
GITHUB_OUTPUT: ""
on:
push:
branches:
- main
paths:
- "docker/ubuntu-2204-builder.Dockerfile"
- ".github/workflows/ubuntu-2204.yml"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "docker/ubuntu-2204-builder.Dockerfile"
- ".github/workflows/ubuntu-2204.yml"
workflow_run:
workflows: ["Generate tool-config image"]
types: [completed]
branches:
- 'main'
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 "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-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
psibase-contributor:
name: psibase-contributor
runs-on: ubuntu-latest
needs: ubuntu-2204-builder
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-contributor"
TAGS="${IMAGE}:${{ github.sha }},${IMAGE}:latest"
echo "tags=${TAGS,,}" >> $GITHUB_OUTPUT
- name: Showtag
id: showtag
run: echo ${{ steps.prep.outputs.tags }}
- 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
build-args: |
BUILDER_TAG=${{ github.sha }}
file: docker/psibase-contributor.Dockerfile
tags: ${{ steps.prep.outputs.tags }}
platforms: linux/amd64
outputs: type=image,annotation-index.org.opencontainers.image.description=Psibase development environment