Skip to content

Build: release github workflow fix name #2

Build: release github workflow fix name

Build: release github workflow fix name #2

name: Build and push the release docker image
on:
push:
branches: [ '*' ]
jobs:
build-release-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get tag
run: |
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
echo "TAG=$TAG" >> $GITHUB_ENV
echo "Releasing version $TAG"
- name: Checkout at tag
run: git checkout tags/${{ env.TAG }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push unstable
uses: docker/build-push-action@v6
with:
context: .
file: ./src/docker/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max