mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 03:48:45 +00:00
Let's ensure we're not relying, on any of the called workflows, on event specific information. Right now, the two information we've been relying on are: * PR number, coming from github.event.pull_request.number * Commit hash, coming from github.event.pull_request.head.sha As we want to, in the future, add nightly jobs, which will be triggered by a different event (thus, having different fields populated), we should ensure that those are not used unless it's in the "top action" that's trigerred by the event. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: CI | Publish kata-deploy payload for s390x
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
tarball-suffix:
|
|
required: false
|
|
type: string
|
|
registry:
|
|
required: true
|
|
type: string
|
|
repo:
|
|
required: true
|
|
type: string
|
|
tag:
|
|
required: true
|
|
type: string
|
|
commit-hash:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
kata-payload:
|
|
runs-on: s390x
|
|
steps:
|
|
- name: Adjust a permission for repo
|
|
run: |
|
|
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ inputs.commit-hash }}
|
|
|
|
- name: get-kata-tarball
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: kata-static-tarball-s390x${{ inputs.tarball-suffix }}
|
|
|
|
- name: Login to Kata Containers quay.io
|
|
if: ${{ inputs.registry == 'quay.io' }}
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
|
|
- name: Login to Kata Containers ghcr.io
|
|
if: ${{ inputs.registry == 'ghcr.io' }}
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: build-and-push-kata-payload
|
|
id: build-and-push-kata-payload
|
|
run: |
|
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
|
$(pwd)/kata-static.tar.xz \
|
|
${{ inputs.registry }}/${{ inputs.repo }} ${{ inputs.tag }}
|