Skip to content

remove unnecessary preload #13

remove unnecessary preload

remove unnecessary preload #13

name: Publish image to container registry on tag
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
prerequisites:
name: Check prerequisites
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Check whether elements exist for the current release-tag in CHANGELOG.md
shell: bash
run: |
grep "${{ github.ref_name }}" CHANGELOG.md
- name: Delete version-tag when CHANGELOG.md doesn't contain information about it
if: failure()
shell: bash
run: |
git config --global user.name 'GithubActions'
git config --global user.email '[email protected]'
git push --delete origin ${{ github.ref_name }}
build-and-push:
needs: prerequisites
name: Build tagged docker image and push to container registry
runs-on: ubuntu-24.04
permissions:
packages: write
steps:
- uses: actions/checkout@v6
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max