Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
Signed-off-by: Fabiano Fidêncio <[email protected]>
  • Loading branch information
fidencio committed Apr 5, 2023
1 parent ebb19e4 commit 3588445
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/publish-kata-deploy-payload-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI | Publish kata-deploy payload for amd64
on:
workflow_call:
inputs:
ref:
required: false
type: string
tarball-suffix:
required: false
type: string
Expand All @@ -24,11 +27,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}

- name: get-kata-tarball
uses: actions/download-artifact@v3
uses: actions/github-script@v3.1.0
with:
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "kata-static-tarball-amd64${{ inputs.tarball-suffix }}"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'tar.xz',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/kata-static-tarball-amd64${{ inputs.tarball-suffix }}.tar.xz', Buffer.from(download.data));
- name: Login to Kata Containers quay.io
uses: docker/login-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-kata-deploy-payload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
with:
ref: ${{ github.event.workflow_run.head_sha }}
tarball-suffix: -${{ github.event.workflow_run.head_sha }}
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
Expand Down

0 comments on commit 3588445

Please sign in to comment.