Skip to content

Commit

Permalink
ci: test example recipes before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Nov 12, 2024
1 parent 485e9d3 commit 121ee39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/publish-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,31 @@ jobs:
packages: write
env:
DOCKER_CONFIG: $HOME/.docker
strategy:
fail-fast: false
matrix:
recipe_name:
- github-action
- minimal
- terraform-bootstrap
- variable-file-names
- variable-types
- with-tests
steps:
- uses: actions/checkout@v4

- uses: futurice/jalapeno@main
name: Test ${{ matrix.recipe_name }}
with:
cmd: test examples/${{ matrix.recipe_name }}

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# TODO: Loop over dynamically through all examples
- uses: futurice/jalapeno@main
with:
cmd: push ./examples/github-action oci://ghcr.io/futurice/jalapeno/examples/github-action
- uses: futurice/jalapeno@main
with:
cmd: push ./examples/minimal oci://ghcr.io/futurice/jalapeno/examples/minimal
- uses: futurice/jalapeno@main
with:
cmd: push ./examples/variable-types oci://ghcr.io/futurice/jalapeno/examples/variable-types
- uses: futurice/jalapeno@main
with:
cmd: push ./examples/with-tests oci://ghcr.io/futurice/jalapeno/examples/with-tests
- uses: futurice/jalapeno@main
name: Push ${{ matrix.recipe_name }}
with:
cmd: push ./examples/terraform-bootstrap oci://ghcr.io/futurice/jalapeno/examples/terraform-bootstrap
cmd: push examples/${{ matrix.recipe_name }} ghcr.io/futurice/jalapeno/examples/${{ matrix.recipe_name }} --latest
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
- uses: futurice/jalapeno@main
id: jalapeno
with:
cmd: check
cmd: check --detailed-exitcode
- if: steps.jalapeno.outputs.exit-code == '2'
run: echo "::notice::Jalapeno updates available"

0 comments on commit 121ee39

Please sign in to comment.