Skip to content

ci: test example recipes before publishing #24

ci: test example recipes before publishing

ci: test example recipes before publishing #24

name: Publish recipe examples
on:
push:
branches:
- main
paths:
- ".github/workflows/publish-examples.yml"
- "examples/**"
jobs:
publish:
name: Publish example recipes
runs-on: ubuntu-latest
permissions:
contents: write
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 }}
- uses: futurice/jalapeno@main
name: Push ${{ matrix.recipe_name }}
with:
cmd: push examples/${{ matrix.recipe_name }} ghcr.io/futurice/jalapeno/examples/${{ matrix.recipe_name }} --latest