Skip to content

Commit

Permalink
ci: create a new workflow for getting charm paths and building them w…
Browse files Browse the repository at this point in the history
…ith cache

This new workflow uses the  as
the central piece for building charms in dedicated machines and uploading them as artefacts. This is
beneficial because it will allow the CI of pull requests to use charm artefacts in different operations,
such as testing and publishing, this change also helps reducing the build time as the
workflow is set to use charmcarft cache.

Fixes #87
  • Loading branch information
DnPlas committed Dec 17, 2024
1 parent c158e94 commit f13a4f9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/get_charms_build_with_cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Get charms and build with cache (common)

on:
workflow_call:

jobs:

get-charm-paths:
name: Generate the Charm Matrix content
runs-on: ubuntu-latest
outputs:
charm_paths: ${{ steps.get-charm-paths.outputs.charm-paths }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get paths for all charms in this repo
id: get-charm-paths
uses: canonical/kubeflow-ci/actions/get-charm-paths@main

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v21.0.0
needs: get-charm-paths
strategy:
fail-fast: false
matrix:
charm: ${{ fromJson(needs.get-charm-paths.outputs.charm_paths) }}
with:
cache: true
charmcraft-snap-channel: 3.x/edge
path-to-charm-directory: ./${{ matrix.charm }}

0 comments on commit f13a4f9

Please sign in to comment.