chore(release): add v1.0.0 versioning, release workflow, and versioned docker image

- Add VERSION file (1.0.0)
- Add GitHub Actions release workflow to build and push Docker images to ghcr.io
- Update docker-compose.yml to pull ghcr.io/cqrenet/aoc-backend:v1.0.0 by default
This commit is contained in:
2026-04-16 11:40:28 +02:00
parent 82bafc06c9
commit 9dba33aa9f
3 changed files with 58 additions and 1 deletions

55
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Release
on:
push:
tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-backend
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true