mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-06 02:24:44 +00:00
gha: release: Update the workflow
The release workflow is now updated to be a `workflow_call`, and it includes the steps that had to be manually done in the past, such as updating the needed files and creating the release itself. While on this, the kata-deploy multiarch manifest tags have been updated to match the new release scheme. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
f0675a163a
commit
f9f04dca2b
42
.github/workflows/release.yaml
vendored
42
.github/workflows/release.yaml
vendored
@ -1,14 +1,37 @@
|
|||||||
name: Publish Kata release artifacts
|
name: Release Kata Containers
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_call:
|
||||||
tags:
|
inputs:
|
||||||
- '[0-9]+.[0-9]+.[0-9]+*'
|
release-type:
|
||||||
|
required: true
|
||||||
concurrency:
|
type: string
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get the new release version
|
||||||
|
run: |
|
||||||
|
release_version=$(./tools/packaging/release/release.sh next-release-version)
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> "$GITHUB_ENV"
|
||||||
|
env:
|
||||||
|
RELEASE_TYPE: ${{ inputs.release-type }}
|
||||||
|
|
||||||
|
- name: Update VERSION file
|
||||||
|
run: |
|
||||||
|
./tools/packaging/release/release.sh update-version-file
|
||||||
|
|
||||||
|
- name: Create a new release
|
||||||
|
run: |
|
||||||
|
./tools/packaging/release/release.sh create-new-release
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
build-and-push-assets-amd64:
|
build-and-push-assets-amd64:
|
||||||
uses: ./.github/workflows/release-amd64.yaml
|
uses: ./.github/workflows/release-amd64.yaml
|
||||||
with:
|
with:
|
||||||
@ -55,8 +78,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Push multi-arch manifest
|
- name: Push multi-arch manifest
|
||||||
run: |
|
run: |
|
||||||
tags="$(echo $GITHUB_REF | cut -d/ -f3-)"
|
tags="$(cat VERSION) latest"
|
||||||
tags+=" $([[ \"${tag}\" =~ \"alpha\"|\"rc\" ]] && echo \"latest\" || echo \"stable\"))"
|
|
||||||
echo "KATA_DEPLOY_IMAGE_TAGS=\"${tags}\"" >> "$GITHUB_ENV"
|
echo "KATA_DEPLOY_IMAGE_TAGS=\"${tags}\"" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
./tools/packaging/release/release.sh publish-multiarch-manifest
|
./tools/packaging/release/release.sh publish-multiarch-manifest
|
||||||
|
Loading…
Reference in New Issue
Block a user