-
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.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 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,42 @@ | ||
name: Build Rocks | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image-build-args: | ||
description: | | ||
List of build args to pass to the build image job | ||
type: string | ||
default: "" | ||
registry: | ||
description: Container Registrying top-level domain | ||
type: string | ||
default: ghcr.io | ||
trivy-image-config: | ||
type: string | ||
description: Trivy YAML configuration for image testing that is checked in as part of the repo | ||
working-directory: | ||
type: string | ||
description: The working directory for jobs | ||
default: "./" | ||
|
||
env: | ||
REGISTRY: ${{ inputs.registry }} | ||
OWNER: ${{ github.repository_owner }} | ||
|
||
jobs: | ||
get-runner-image: | ||
name: Get runner image | ||
uses: canonical/operator-workflows/.github/workflows/get_runner_image.yaml@main | ||
with: | ||
working-directory: ${{ inputs.working-directory }} | ||
build-rocks: | ||
name: Build rock | ||
uses: canonical/operator-workflows/.github/workflows/build_rocks.yaml@main | ||
needs: get-runner-image | ||
with: | ||
owner: ${{ env.OWNER }} | ||
registry: ${{ env.REGISTRY }} | ||
runs-on: ${{ needs.get-runner-image.outputs.runs-on }} | ||
trivy-image-config: ${{ inputs.trivy-image-config }} | ||
working-directory: ${{ inputs.working-directory }} |
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,10 @@ | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build-rocks: | ||
name: Build Rocks | ||
uses: ./.github/workflows/build_rock.yaml | ||
with: | ||
trivy-image-config: "trivy.yaml" |
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,3 @@ | ||
timeout: 20m | ||
scan: | ||
offline-scan: true |