version bump #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+ | |
permissions: read-all | |
jobs: | |
docker-hub: | |
name: Docker Hub | |
runs-on: ubuntu-22.04 | |
permissions: | |
id-token: write # To perform keyless signing with cosign | |
environment: | |
name: docker | |
url: https://hub.docker.com/r/ericornelissen/ades | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- name: Install cosign | |
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 | |
with: | |
cosign-release: v2.2.3 | |
- name: Get release version | |
id: version | |
shell: bash | |
run: | | |
echo "version=${GITHUB_REF#refs/tags/}" >>"$GITHUB_OUTPUT" | |
- name: Log in to Docker Hub | |
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push to Docker Hub | |
id: docker | |
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | |
with: | |
context: . | |
file: Containerfile | |
push: true | |
tags: >- | |
ericornelissen/ades:latest, | |
ericornelissen/ades:${{ steps.version.outputs.version }} | |
- name: Sign container image | |
env: | |
DIGEST: ${{ steps.docker.outputs.digest }} | |
REF: ${{ github.sha }} | |
REPO: ${{ github.repository }} | |
WORKFLOW: ${{ github.workflow }} | |
run: | | |
cosign sign --yes \ | |
-a "ref=${REF}" \ | |
-a "repo=${REPO}" \ | |
-a "workflow=${WORKFLOW}" \ | |
"docker.io/ericornelissen/ades@${DIGEST}" | |
github-release: | |
name: GitHub Release | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write # To create a GitHub Release | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- name: Install Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version-file: go.mod | |
- name: Get release version | |
id: version | |
shell: bash | |
run: | | |
echo "version=${GITHUB_REF#refs/tags/}" >>"$GITHUB_OUTPUT" | |
- name: Compile | |
run: make release-compile | |
- name: Create GitHub release | |
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 | |
with: | |
tag: ${{ steps.version.outputs.version }} | |
name: Release ${{ steps.version.outputs.version }} | |
body: ${{ steps.version.outputs.version }} | |
artifacts: ./_compiled/* |