Multi stage build and publish #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |