Skip to content

Commit

Permalink
Build and Publish Rocks workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Jan 18, 2024
1 parent 3da6ed0 commit b33a6c8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build_rock.yaml
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 }}
10 changes: 10 additions & 0 deletions .github/workflows/pull_request.yaml
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"
3 changes: 3 additions & 0 deletions trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
timeout: 20m
scan:
offline-scan: true

0 comments on commit b33a6c8

Please sign in to comment.