From 890e75f88ef19bd7ae37858b526d56739c059d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kivim=C3=A4ki?= Date: Sun, 12 Nov 2023 13:14:44 +0200 Subject: [PATCH] Publish example recipes --- .github/workflows/publish-examples.yml | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-examples.yml diff --git a/.github/workflows/publish-examples.yml b/.github/workflows/publish-examples.yml new file mode 100644 index 00000000..6da125d2 --- /dev/null +++ b/.github/workflows/publish-examples.yml @@ -0,0 +1,44 @@ +name: Test + +on: + push: + branches: + - main + +jobs: + publish: + name: Publish example recipes + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v3 + + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-go@v3 + with: + go-version: "1.21" + + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-golang-${{ hashFiles('go.sum') }} + restore-keys: | + ${{ runner.os }}-golang- + + - uses: arduino/setup-task@v1 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} # https://github.com/arduino/setup-task#repo-token + + - name: Run tests + working-directory: examples + run: task run -- push minimal oci://ghcr.io/futurice/jalapeno/examples/minimal