Skip to content

Commit 121ee39

Browse files
committed
ci: test example recipes before publishing
1 parent 485e9d3 commit 121ee39

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

.github/workflows/publish-examples.yml

+17-14
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,31 @@ jobs:
1717
packages: write
1818
env:
1919
DOCKER_CONFIG: $HOME/.docker
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
recipe_name:
24+
- github-action
25+
- minimal
26+
- terraform-bootstrap
27+
- variable-file-names
28+
- variable-types
29+
- with-tests
2030
steps:
2131
- uses: actions/checkout@v4
2232

33+
- uses: futurice/jalapeno@main
34+
name: Test ${{ matrix.recipe_name }}
35+
with:
36+
cmd: test examples/${{ matrix.recipe_name }}
37+
2338
- uses: docker/login-action@v3
2439
with:
2540
registry: ghcr.io
2641
username: ${{ github.actor }}
2742
password: ${{ secrets.GITHUB_TOKEN }}
2843

29-
# TODO: Loop over dynamically through all examples
30-
- uses: futurice/jalapeno@main
31-
with:
32-
cmd: push ./examples/github-action oci://ghcr.io/futurice/jalapeno/examples/github-action
33-
- uses: futurice/jalapeno@main
34-
with:
35-
cmd: push ./examples/minimal oci://ghcr.io/futurice/jalapeno/examples/minimal
36-
- uses: futurice/jalapeno@main
37-
with:
38-
cmd: push ./examples/variable-types oci://ghcr.io/futurice/jalapeno/examples/variable-types
39-
- uses: futurice/jalapeno@main
40-
with:
41-
cmd: push ./examples/with-tests oci://ghcr.io/futurice/jalapeno/examples/with-tests
4244
- uses: futurice/jalapeno@main
45+
name: Push ${{ matrix.recipe_name }}
4346
with:
44-
cmd: push ./examples/terraform-bootstrap oci://ghcr.io/futurice/jalapeno/examples/terraform-bootstrap
47+
cmd: push examples/${{ matrix.recipe_name }} ghcr.io/futurice/jalapeno/examples/${{ matrix.recipe_name }} --latest

examples/github-action/tests/defaults/files/.github/workflows/check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
- uses: futurice/jalapeno@main
2222
id: jalapeno
2323
with:
24-
cmd: check
24+
cmd: check --detailed-exitcode
2525
- if: steps.jalapeno.outputs.exit-code == '2'
2626
run: echo "::notice::Jalapeno updates available"

0 commit comments

Comments
 (0)