|
30 | 30 | name: Check staging release matches |
31 | 31 | environment: release |
32 | 32 | runs-on: ubuntu-latest |
| 33 | + outputs: |
| 34 | + major-version: ${{ steps.get_major_version.outputs.value }} |
33 | 35 | steps: |
34 | 36 | - name: Get the version on staging |
35 | 37 | run: | |
|
44 | 46 | AWS_URL: https://${{ secrets.AWS_S3_BUCKET_STAGING }}.s3.amazonaws.com |
45 | 47 | RELEASE_VERSION: ${{ github.event.inputs.version }} |
46 | 48 |
|
| 49 | + # Get the major version, i.e. 1.9.3 --> 1.9, or just return the passed in version. |
| 50 | + - name: Convert to major version format |
| 51 | + id: get_major_version |
| 52 | + run: | |
| 53 | + MAJOR_VERSION="$RELEASE_VERSION" |
| 54 | + if [[ $RELEASE_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then |
| 55 | + MAJOR_VERSION="${BASH_REMATCH[0]}" |
| 56 | + fi |
| 57 | + echo "::set-output name=value::$MAJOR_VERSION" |
| 58 | + shell: bash |
| 59 | + env: |
| 60 | + RELEASE_VERSION: ${{ github.event.inputs.version }} |
| 61 | + |
47 | 62 | # 1. Take packages from the staging bucket |
48 | 63 | # 2. Sign them with the release GPG key |
49 | 64 | # 3. Also take existing release packages from the release bucket. |
@@ -141,16 +156,25 @@ jobs: |
141 | 156 | # Simple skopeo copy jobs to transfer image from staging to release registry with optional GPG key signing. |
142 | 157 | # Unfortunately skopeo currently does not support Cosign: https://github.com/containers/skopeo/issues/1533 |
143 | 158 | staging-release-images: |
| 159 | + name: Release ${{ matrix.tag }} container images |
144 | 160 | runs-on: ubuntu-latest |
145 | | - needs: staging-release-version-check |
| 161 | + needs: |
| 162 | + - staging-release-version-check |
146 | 163 | environment: release |
147 | 164 | env: |
148 | 165 | STAGING_IMAGE_NAME: ghcr.io/${{ github.repository }}/staging |
149 | 166 | strategy: |
150 | 167 | fail-fast: false |
151 | 168 | matrix: |
152 | 169 | # All the explicit tags we want to release |
153 | | - tag: [ "${{ github.event.inputs.version }}", "latest", "${{ github.event.inputs.version }}-debug", "latest-debug" ] |
| 170 | + tag: [ |
| 171 | + "${{ github.event.inputs.version }}", |
| 172 | + "${{ needs.staging-release-version-check.outputs.major-version }}", |
| 173 | + "latest", |
| 174 | + "${{ github.event.inputs.version }}-debug", |
| 175 | + "${{ needs.staging-release-version-check.outputs.major-version }}-debug", |
| 176 | + "latest-debug" |
| 177 | + ] |
154 | 178 | steps: |
155 | 179 | # Primarily because the skopeo errors are hard to parse and non-obvious |
156 | 180 | - name: Check the image exists |
|
0 commit comments