mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-15 03:41:19 +00:00
Otherwise we'll face the following error as part of our GHA: ``` The workflow is not valid. kata-containers/kata-containers/.github/workflows/release-$foo.yaml (Line: 13, Col: 14): Invalid input, stage is not defined in the referenced workflow. ``` Fixes: #7497 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: Publish Kata release artifacts for s390x
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
target-arch:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build-kata-static-tarball-s390x:
|
|
uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml
|
|
with:
|
|
stage: "release"
|
|
|
|
kata-deploy:
|
|
needs: build-kata-static-tarball-s390x
|
|
runs-on: s390x
|
|
steps:
|
|
- name: Login to Kata Containers docker.io
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Login to Kata Containers quay.io
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
|
|
- uses: actions/checkout@v3
|
|
- name: get-kata-tarball
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: kata-static-tarball-s390x
|
|
|
|
- name: build-and-push-kata-deploy-ci-s390x
|
|
id: build-and-push-kata-deploy-ci-s390x
|
|
run: |
|
|
# We need to do such trick here as the format of the $GITHUB_REF
|
|
# is "refs/tags/<tag>"
|
|
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
|
|
tags=($tag)
|
|
tags+=($([[ "$tag" =~ "alpha"|"rc" ]] && echo "latest" || echo "stable"))
|
|
for tag in ${tags[@]}; do
|
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
|
$(pwd)/kata-static.tar.xz "docker.io/katadocker/kata-deploy" \
|
|
"${tag}-${{ inputs.target-arch }}"
|
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
|
$(pwd)/kata-static.tar.xz "quay.io/kata-containers/kata-deploy" \
|
|
"${tag}-${{ inputs.target-arch }}"
|
|
done
|