Skip to content

Multi stage build and publish #11

Multi stage build and publish

Multi stage build and publish #11

name: Multi stage build and publish
on:
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository }}
jobs:
build-and-publish:
name: Build and publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
release-distro: [fedora-oxidized.toolbox, ubuntu-oxidized.toolbox, arch-oxidized.toolbox]
steps:
- uses: actions/checkout@v2
# This step MUST be performed before multistage-docker-build
- name: Auth to GH registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: lowercase IMAGE_REGISTRY
run: |
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY@L}" >> ${GITHUB_ENV}
- uses: firehed/multistage-docker-build-action@v1
id: build
with:
dockerfile: Containerfile
repository: ${{ env.IMAGE_REGISTRY }}
stages: builder
server-stage: ${{ matrix.release-distro }}