Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

wip

wip #10

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
test:
uses: ./.github/workflows/test.yml
docker:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
- uses: docker/#-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
id: build-and-push
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs:
meta: ${{ steps.meta.outputs.json }}
digest: ${{ steps.build-and-push.outputs.digest }}
cosign:
runs-on: ubuntu-latest
needs: docker
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
strategy:
matrix:
tag: ${{ fromJSON(needs.docker.outputs.meta).tags }}
steps:
- uses: sigstore/cosign-installer@v3
- run: cosign version
- run: cosign sign --yes "${{ matrix.tag }}@${{ needs.docker.outputs.digest }}"