Skip to content

chore(release): 0.5.1 #63

chore(release): 0.5.1

chore(release): 0.5.1 #63

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/freemannotes
tags: |
# 1. Handle semantic versioning (v0.3.3 -> 0.3.3)
type=semver,pattern={{version}}
# 2. Handle major/minor versions (v0.3.3 -> 0.3)
type=semver,pattern={{major}}.{{minor}}
# 3. Force update 'latest' for BOTH main branch pushes and version tags
type=raw,value=latest,enable=true
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
target: runner
# Note: Multi-platform builds are slower but preferred for parity
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max