Skip to content

fix: bump golang ver #605

fix: bump golang ver

fix: bump golang ver #605

Workflow file for this run

name: Publish Docker image
on:
workflow_dispatch:
push:
branches:
- master
tags:
- "v*.*.*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
with:
buildkitd-config: .github/buildkitd.toml
- name: Login to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Retrieve author data
id: author
run: |
AUTHOR=$(curl -sSL ${{ github.event.repository.owner.url }} | jq -r '.name')
echo "AUTHOR=$AUTHOR" >> $GITHUB_ENV
- name: Set up environment
run: |
echo "TAG_NAME=" >> $GITHUB_ENV
if [[ "${GITHUB_REF##*/}" == "main" ]]; then
echo "TAG_NAME=main" >> $GITHUB_ENV
elif [[ "${GITHUB_REF##*/}" == "master" ]]; then
echo "TAG_NAME=master" >> $GITHUB_ENV
fi
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.TAG_NAME }}
type=ref,event=branch
type=ref,event=tag
type=sha,prefix=sha-
labels: |
org.opencontainers.image.authors=${{ env.AUTHOR }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.created=${{ steps.meta.outputs.created }}
- name: Build and push container image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/ppc64le,linux/s390x
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.head_ref || github.ref_name }}
COMMIT=${{ github.sha }}