Skip to content

Commit

Permalink
Craft multiarch manifests on gh push for all arches defined in rockcr…
Browse files Browse the repository at this point in the history
…aft.yaml
  • Loading branch information
addyess committed Jan 30, 2024
1 parent 4841926 commit 9fca6b9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Push Multiarch Images
on:
pull_request:
push:
branches:
- rockcraft

jobs:
build-and-push-arch-specifics:
name: Build Rocks and Push Arch Specific Images
uses: canonical/k8s-workflows/.github/workflows/build_rocks.yaml@main
with:
owner: ${{ github.repository_owner }}
trivy-image-config: "trivy.yaml"
multiarch-awareness: true
cache-action: ${{ (github.event_name == 'push') && 'save' || 'restore' }}
build-and-push-multiarch-manifest:
name: Combine Rocks and Push Multiarch Manifest
uses: canonical/k8s-workflows/.github/workflows/assemble_multiarch_image.yaml@main
needs: [build-and-push-arch-specifics]
with:
rock-metas: ${{ needs.build-and-push-arch-specifics.outputs.rock-metas }}
dry-run: ${{ github.event_name != 'push' }}
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 9fca6b9

Please sign in to comment.