workflows: sync major version of container images
@@ -30,6 +30,8 @@ jobs:
name: Check staging release matches
environment: release
runs-on: ubuntu-latest
+ outputs:
+ major-version: ${{ steps.get_major_version.outputs.value }}
steps:
- name: Get the version on staging
run: |
@@ -44,6 +46,19 @@ jobs:
AWS_URL: https://${{ secrets.AWS_S3_BUCKET_STAGING }}.s3.amazonaws.com
RELEASE_VERSION: ${{ github.event.inputs.version }}
+ # Get the major version, i.e. 1.9.3 --> 1.9, or just return the passed in version.
+ - name: Convert to major version format
+ id: get_major_version
+ run: |
+ MAJOR_VERSION="$RELEASE_VERSION"
+ if [[ $RELEASE_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
+ MAJOR_VERSION="${BASH_REMATCH[0]}"
+ fi
+ echo "::set-output name=value::$MAJOR_VERSION"
+ shell: bash
+ env:
+ RELEASE_VERSION: ${{ github.event.inputs.version }}
+
# 1. Take packages from the staging bucket
# 2. Sign them with the release GPG key
# 3. Also take existing release packages from the release bucket.
@@ -141,8 +156,10 @@ jobs:
# Simple skopeo copy jobs to transfer image from staging to release registry with optional GPG key signing.
# Unfortunately skopeo currently does not support Cosign: https://github.com/containers/skopeo/issues/1533
staging-release-images:
+ name: Release ${{ matrix.tag }} container images
runs-on: ubuntu-latest
- needs: staging-release-version-check
+ needs:
+ - staging-release-version-check
environment: release
env:
STAGING_IMAGE_NAME: ghcr.io/${{ github.repository }}/staging
@@ -150,7 +167,14 @@ jobs:
fail-fast: false
matrix:
# All the explicit tags we want to release
- tag: [ "${{ github.event.inputs.version }}", "latest", "${{ github.event.inputs.version }}-debug", "latest-debug" ]
+ tag: [
+ "${{ github.event.inputs.version }}",
+ "${{ needs.staging-release-version-check.outputs.major-version }}",
+ "latest",
+ "${{ github.event.inputs.version }}-debug",
+ "${{ needs.staging-release-version-check.outputs.major-version }}-debug",
+ "latest-debug"
+ ]
steps:
# Primarily because the skopeo errors are hard to parse and non-obvious
- name: Check the image exists
