forked from kata-containers/kata-containers
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gha: Split the Kata Containers CI workflow
We've been facing some issues in order to properly run, in a safe way, the workflows for the Kata Containers CI. This happens as the `pull_request` target doesn't allow passing any secrets to workflows; and the `pull_request_target` workflow, which allows passing the secrets, doesn't run on the PR itself but rather on the target PR branch. :-/ https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ proposes a reasonable solution, which I'm trying to mimic here. Signed-off-by: Fabiano Fidêncio <[email protected]>
- Loading branch information
Showing
4 changed files
with
39 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: CI | Build Kata Containers artefacts | ||
on: | ||
pull_request | ||
|
||
jobs: | ||
build-kata-static-tarball-amd64: | ||
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml | ||
with: | ||
tarball-suffix: -${{ github.sha }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI | Publish kata-deploy payload | ||
on: | ||
workflow_run: | ||
workflows: | ||
- CI | Build Kata Containers artefacts | ||
types: | ||
- completed | ||
|
||
jobs: | ||
publish-kata-deploy-payload-amd64: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml | ||
with: | ||
tarball-suffix: -${{ github.event.workflow_run.head_sha }} | ||
registry: ghcr.io | ||
repo: ${{ github.repository_owner }}/kata-deploy-ci | ||
tag: -${{ github.event.workflow_run.head_sha }}-amd64 | ||
quay-io-login-continue-on-error: true | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters