Skip to content

Bump alpine from 3.20.1 to 3.20.3 #576

Bump alpine from 3.20.1 to 3.20.3

Bump alpine from 3.20.1 to 3.20.3 #576

Workflow file for this run

name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
create:
tags:
- v*
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.16
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: |
go build -v .
go clean
- name: Trigger Go Report Card
run: curl -d "repo=github.com/fhopfensperger/async-messaging-client" https://goreportcard.com/checks
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Set release version
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "RELEASE_VERSION_WITHOUT_V=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Set up QEMU
if: startsWith(github.ref, 'refs/tags/')
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: startsWith(github.ref, 'refs/tags/')
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
BUILD_VERSION=${{ env.RELEASE_VERSION_WITHOUT_V }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION_WITHOUT_V }}