Skip to content

Commit

Permalink
build all images, only build for risc-v for debian sid images
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Apr 14, 2024
1 parent 42aa1d6 commit e0e8c59
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/build-publish-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ jobs:
contents: read
strategy:
matrix:
#tag: ['client:centos7', 'build-node:debian11']
tag: ['build-node:debian-sid']
tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid']
platform: [amd64, arm64, riscv64]
exclude:
# exclude images that don't support RISC-V
- tag: client:centos7
platform: riscv64
- tag: build-node:debian11
platform: riscv64

steps:
- name: Check out the repo
Expand Down Expand Up @@ -92,8 +97,7 @@ jobs:
contents: read
strategy:
matrix:
#tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid']
tag: ['build-node:debian-sid']
tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid']
steps:
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
Expand All @@ -108,13 +112,20 @@ jobs:
echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Create the final image using "docker buildx imagetools create"
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && matrix.tag == 'build-node:debian-sid'
run: |
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-riscv64
- name: Create the final image using "docker buildx imagetools create"
if: github.event_name != 'pull_request' && matrix.tag != 'build-node:debian-sid'
run: |
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64
- name: Inspect the final image
if: github.event_name != 'pull_request'
run: docker buildx imagetools inspect ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}

0 comments on commit e0e8c59

Please sign in to comment.