Skip to content

wip

wip #31

Workflow file for this run

name: Release
on:
push:
branches:
- release
- fix-db-path
workflow_dispatch:
jobs:
build-docker:
name: Build Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version
id: version
run: |
VERSION=$(grep '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "commit=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ steps.version.outputs.version }}
type=sha
- uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
APP_VERSION=${{ steps.version.outputs.version }}
GIT_COMMIT=${{ steps.version.outputs.commit }}