Merge pull request #9203 from fidencio/topic/releases-follow-up-III

release: Ensure the release-type is passed to workflows
This commit is contained in:
Steve Horsman
2024-03-08 14:09:36 +00:00
committed by GitHub
7 changed files with 41 additions and 36 deletions

View File

@@ -48,7 +48,7 @@ jobs:
commit-hash: ${{ github.sha }}
registry: quay.io
repo: kata-containers/kata-deploy-ci
tag: kata-containers-amd64
tag: kata-containers-latest-amd64
target-branch: ${{ github.ref_name }}
secrets: inherit
@@ -59,7 +59,7 @@ jobs:
commit-hash: ${{ github.sha }}
registry: quay.io
repo: kata-containers/kata-deploy-ci
tag: kata-containers-arm64
tag: kata-containers-latest-arm64
target-branch: ${{ github.ref_name }}
secrets: inherit
@@ -70,7 +70,7 @@ jobs:
commit-hash: ${{ github.sha }}
registry: quay.io
repo: kata-containers/kata-deploy-ci
tag: kata-containers-s390x
tag: kata-containers-latest-s390x
target-branch: ${{ github.ref_name }}
secrets: inherit
@@ -81,7 +81,7 @@ jobs:
commit-hash: ${{ github.sha }}
registry: quay.io
repo: kata-containers/kata-deploy-ci
tag: kata-containers-ppc64le
tag: kata-containers-latest-ppc64le
target-branch: ${{ github.ref_name }}
secrets: inherit

View File

@@ -5,6 +5,9 @@ on:
target-arch:
required: true
type: string
release-type:
required: true
type: string
jobs:
build-kata-static-tarball-amd64:
@@ -42,7 +45,7 @@ jobs:
# is "refs/tags/<tag>"
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh next-release-version)
tag=$(RELEASE_TYPE=${{ inputs.release-type }} ./tools/packaging/release/release.sh next-release-version)
tags=(${tag} "latest")
else
tags=(${tag})

View File

@@ -5,6 +5,9 @@ on:
target-arch:
required: true
type: string
release-type:
required: true
type: string
jobs:
build-kata-static-tarball-arm64:
@@ -42,7 +45,7 @@ jobs:
# is "refs/tags/<tag>"
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh next-release-version)
tag=$(RELEASE_TYPE=${{ inputs.release-type }} ./tools/packaging/release/release.sh next-release-version)
tags=(${tag} "latest")
else
tags=(${tag})

View File

@@ -5,6 +5,9 @@ on:
target-arch:
required: true
type: string
release-type:
required: true
type: string
jobs:
build-kata-static-tarball-ppc64le:
@@ -42,7 +45,7 @@ jobs:
# is "refs/tags/<tag>"
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh next-release-version)
tag=$(RELEASE_TYPE=${{ inputs.release-type }} ./tools/packaging/release/release.sh next-release-version)
tags=(${tag} "latest")
else
tags=(${tag})

View File

@@ -5,6 +5,9 @@ on:
target-arch:
required: true
type: string
release-type:
required: true
type: string
jobs:
build-kata-static-tarball-s390x:
@@ -43,7 +46,7 @@ jobs:
# is "refs/tags/<tag>"
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh next-release-version)
tag=$(RELEASE_TYPE=${{ inputs.release-type }} ./tools/packaging/release/release.sh next-release-version)
tags=(${tag} "latest")
else
tags=(${tag})

View File

@@ -6,12 +6,11 @@ on:
required: true
type: string
env:
RELEASE_TYPE: ${{ inputs.release-type }}
jobs:
release:
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ inputs.release-type }}
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -38,6 +37,7 @@ jobs:
uses: ./.github/workflows/release-amd64.yaml
with:
target-arch: amd64
release-type: ${{ inputs.release-type }}
secrets: inherit
build-and-push-assets-arm64:
@@ -45,6 +45,7 @@ jobs:
uses: ./.github/workflows/release-arm64.yaml
with:
target-arch: arm64
release-type: ${{ inputs.release-type }}
secrets: inherit
build-and-push-assets-s390x:
@@ -52,6 +53,7 @@ jobs:
uses: ./.github/workflows/release-s390x.yaml
with:
target-arch: s390x
release-type: ${{ inputs.release-type }}
secrets: inherit
build-and-push-assets-ppc64le:
@@ -59,11 +61,14 @@ jobs:
uses: ./.github/workflows/release-ppc64le.yaml
with:
target-arch: ppc64le
release-type: ${{ inputs.release-type }}
secrets: inherit
publish-multi-arch-images:
runs-on: ubuntu-latest
needs: [build-and-push-assets-amd64, build-and-push-assets-arm64, build-and-push-assets-s390x, build-and-push-assets-ppc64le]
env:
RELEASE_TYPE: ${{ inputs.release-type }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -95,6 +100,8 @@ jobs:
upload-multi-arch-static-tarball:
needs: [build-and-push-assets-amd64, build-and-push-assets-arm64, build-and-push-assets-s390x, build-and-push-assets-ppc64le]
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ inputs.release-type }}
steps:
- uses: actions/checkout@v4
@@ -150,6 +157,8 @@ jobs:
upload-versions-yaml:
needs: release
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ inputs.release-type }}
steps:
- uses: actions/checkout@v4
- name: upload versions.yaml
@@ -161,6 +170,8 @@ jobs:
upload-cargo-vendored-tarball:
needs: release
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ inputs.release-type }}
steps:
- uses: actions/checkout@v4
- name: generate-and-upload-tarball
@@ -172,6 +183,8 @@ jobs:
upload-libseccomp-tarball:
needs: release
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ inputs.release-type }}
steps:
- uses: actions/checkout@v4
- name: download-and-upload-tarball