Skip to content

version bump

version bump #6

Workflow file for this run

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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- 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@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to Docker Hub
id: docker
uses: docker/build-push-action@94f8f8c2eec4bc3f1d78c1755580779804cb87b2 # v6.0.1
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:
attestations: write # To create GitHub Attestations
contents: write # To create a GitHub Release
id-token: write # To perform keyless signing with cosign for attestations
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Install Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
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: go run tasks.go build-all
- 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/*
- name: Attest build provenance
uses: actions/attest-build-provenance@534b352d658f90498fd148d231fdbf88f3886a3a # v1.3.1
with:
subject-path: ./_compiled/*