Skip to content

v1.12.1

v1.12.1 #89

Workflow file for this run

name: Docker Image CI
on:
release:
types:
- created
jobs:
build-release:
name: GitHub Container Registry
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/buggregator/server
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: ./
platforms: linux/amd64,linux/arm64
file: ./.docker/Dockerfile
push: true
build-args: |
APP_VERSION=${{ github.ref_name }}
FRONTEND_IMAGE_TAG=latest
BRANCH=${{ github.ref_name }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-docker-release:
name: Docker Hub
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: docker_meta
uses: docker/metadata-action@v5
with:
images: butschster/buggregator
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: ./
platforms: linux/amd64,linux/arm64
file: ./.docker/Dockerfile
push: true
build-args: |
APP_VERSION=${{ github.ref_name }}
FRONTEND_IMAGE_TAG=latest
BRANCH=${{ github.ref_name }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max