Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/multiarch-containerfile-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
multiarch-build:
name: Build images
runs-on: ubuntu-22.04
env:
PRINCIPAL: '${{ secrets.QUAY_USER }}:${{ secrets.QUAY_PASSWORD }}'
steps:
- uses: actions/checkout@v2

Expand All @@ -41,8 +43,12 @@ jobs:
echo "Building images from ${GITHUB_REF}@${GITHUB_SHA}"
# Ref: https://regex101.com/r/gcxd4h/1
major_minor="$(echo "$ref" | sed -E 's/^.*?v?([[:digit:]]+)\.([[:digit:]]+).*/\1.\2/')"
echo "container_version=v${major_minor}" >> $GITHUB_OUTPUT
echo "Container version: v${major_minor}"
container_version="${GITHUB_SHA}"
if [[ "$major_minor" != "$ref" ]]; then
container_version="v${major_minor}"
fi
echo "container_version=${container_version}" >> $GITHUB_OUTPUT
echo "Container version: ${container_version}"

- name: Install qemu dependency
run: |
Expand All @@ -60,6 +66,7 @@ jobs:

- name: Push To ${{ inputs.registry }}
id: push-to-quay
if: github.event_name == 'push' && env.PRINCIPAL != ':'
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
Expand Down