Skip to content

Release 2.5.1

Release 2.5.1 #22

Workflow file for this run

name: HAWKI Release Pipeline
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: write
jobs:
build-and-publish:
name: Build & Publish Docker Image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository at release tag
uses: actions/checkout@v7
- name: Read version from config
id: version
uses: hawk-digital-environments/hawk-pipeline-actions/detect-version@v1
with:
strategy: version-json
version-json: config/hawki_version.json
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Required for the registry-backed build cache below
- name: Log in to the GitHub Container registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
push: true
target: app_prod
platforms: linux/amd64,linux/arm64
tags: |
digitalenvironments/hawki:latest
digitalenvironments/hawki:${{ steps.version.outputs.version }}
cache-from: |
type=registry,ref=ghcr.io/hawk-digital-environments/hawki:buildcache-amd64
type=registry,ref=ghcr.io/hawk-digital-environments/hawki:buildcache-arm64
# No cache-to on purpose: exporting a combined multi-arch cache here
# is what triggered the 504s, and nothing reads such a ref anyway -
# the test matrix keeps both per-arch refs up to date.
- name: Generate artifact attestation
uses: actions/attest@v4
with:
subject-name: index.docker.io/digitalenvironments/hawki
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build-and-publish
permissions:
contents: write
outputs:
release-name: ${{ steps.release.outputs.release-name }}
release-body: ${{ steps.release.outputs.release-body }}
release-url: ${{ steps.release.outputs.release-url }}
steps:
- uses: actions/checkout@v7
- id: release
uses: hawk-digital-environments/hawk-pipeline-actions/create-github-release@v1
with:
version: ${{ needs.build-and-publish.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
docs-base-url: https://docs.hawki.info
notify-discord:
name: Notify Discord
runs-on: ubuntu-latest
needs: [ build-and-publish, github-release ]
if: success()
steps:
- uses: actions/checkout@v7
- uses: hawk-digital-environments/hawk-pipeline-actions/send-discord-notification@v1
with:
webhook-url: ${{ secrets.DISCORD_UPDATE_WEBHOOK_URL }}
release-name: ${{ needs.github-release.outputs.release-name }}
release-body: ${{ needs.github-release.outputs.release-body }}
release-url: ${{ needs.github-release.outputs.release-url }}
content: "||@everyone|| Hey there! We released **HAWKI ${{ needs.build-and-publish.outputs.version }}**!"