Skip to content

Bump the actions group across 1 directory with 8 updates #11

Bump the actions group across 1 directory with 8 updates

Bump the actions group across 1 directory with 8 updates #11

Workflow file for this run

name: Docker Build and Push
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Load .env file
run: grep -v '^#' .env | sed 's/"//g' >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=pr
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GO_VERSION=${{ env.GO_VERSION }}
REPO_OWNER=${{ env.REPO_OWNER }}
REPO_BINARY_NAME=${{ env.REPO_BINARY_NAME }}
REPO_DESCRIPTION=${{ env.REPO_DESCRIPTION }}
cache-from: type=gha
cache-to: type=gha,mode=max