Skip to content

Commit

Permalink
workflows: convert to callable builder/binaries/podvm
Browse files Browse the repository at this point in the history
The podvm_builder, podvm_binaries, and podvm workflows were converted to
`workflow_call` so that they can be re-used.

Before, on release time, `podvm_builder` were first triggered on a `release` event
then the others followed upon finish of the previous. With this change,
the `podvm_publish` workflow was created to be the entry point for
the `release` event (or manual dispatch), so the (now) callable `podvm_builder`,
`podvm_binaries`, and `podvm` are directly called.

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
  • Loading branch information
wainersm committed Nov 15, 2023
1 parent abfeaa2 commit 88e2272
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/podvm.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: Create Pod VM Image
on:
workflow_run:
workflows: ["Create Pod VM Binaries Image"]
types:
- completed
workflow_call:

jobs:
build:
name: Create pod vm image
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/podvm_binaries.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: Create Pod VM Binaries Image
on:
workflow_run:
workflows: ["Create Pod VM Builder Image"]
types:
- completed
workflow_call:

jobs:
build:
name: Create pod vm binaries image
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/podvm_builder.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Create Pod VM Builder Image
on:
release:
types: [created]
workflow_call:

jobs:
build:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/podvm_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright Confidential Containers Contributors
# SPDX-License-Identifier: Apache-2.0
#
# Build and push the pod VM images.
---
name: Publish pod VM Images
on:
# Create release Pod VM Images
release:
types: [created]

workflow_dispatch:

jobs:
podvm_builder:
uses: ./.github/workflows/podvm_builder.yaml
secrets: inherit

podvm_binaries:
needs: [podvm_builder]
uses: ./.github/workflows/podvm_binaries.yaml
secrets: inherit

podvm:
needs: [podvm_binaries]
uses: ./.github/workflows/podvm.yaml
secrets: inherit

0 comments on commit 88e2272

Please sign in to comment.