Files
grimmory/.github/workflows/publish-release.yml
T
dependabot[bot] cc4efe5897 chore(deps): bump docker/setup-buildx-action from 3.12.0 to 4.0.0 (#2)
Dependabot couldn't find the original pull request head commit, faed6bf8a712c5fc793fa628157de25d97888131.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 15:51:42 -05:00

77 lines
2.5 KiB
YAML

name: Release - Publish Stable Images
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
name: Build, Publish, and Finalize Stable Release
if: ${{ github.ref_name != 'v2.2.1' }}
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Record Release Tag and Commit
run: |
echo "release_tag=${GITHUB_REF_NAME}" >> "$GITHUB_ENV"
echo "commit_sha=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
echo "Stable release tag: ${GITHUB_REF_NAME}"
- name: Set Up QEMU for Multi-Arch Builds
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Authenticate to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Authenticate to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push Stable image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
grimmory/grimmory:${{ env.release_tag }}
grimmory/grimmory:latest
ghcr.io/grimmory-tools/grimmory:${{ env.release_tag }}
ghcr.io/grimmory-tools/grimmory:latest
build-args: |
APP_VERSION=${{ env.release_tag }}
APP_REVISION=${{ env.commit_sha }}
cache-from: |
type=gha
type=registry,ref=ghcr.io/grimmory-tools/grimmory:buildcache
cache-to: |
type=gha,mode=max
type=registry,ref=ghcr.io/grimmory-tools/grimmory:buildcache,mode=max
- name: Publish Draft GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release edit "${{ env.release_tag }}" --draft=false