Skip to content

Commit

Permalink
ci: support multiple variants
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Aug 29, 2024
1 parent 103920b commit 745f884
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ env:

jobs:
build:
strategy:
fail-fast: false
matrix:
variant:
- base
# - gnome

runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -34,17 +41,17 @@ jobs:
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
# with:
# platforms: arm64

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
# with:
# platforms: linux/amd64,linux/arm64

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
Expand All @@ -71,14 +78,15 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v5
with:
context: base
file: base/Containerfile
context: ${{ matrix.variant }}
file: ${{ matrix.varian t}}/Containerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# tags: ${{ steps.meta.outputs.tags }}
tags: ghcr.io/ultramarine-linux/${{ matrix.variant }}-bootc
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
# platforms: linux/amd64,linux/arm64

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand All @@ -93,4 +101,4 @@ jobs:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 comments on commit 745f884

Please sign in to comment.