Skip to content

Workflow file for this run

on:
release:
types: [created]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-20.04
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/checkout@v4.1.1
- name: Go Mod
run: go mod tidy
- uses: lmangani/go-release-action@v1.37-ubuntu
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.23.1.linux-amd64.tar.gz"
pre_command: export CGO_ENABLED=1
project_path: "."
binary_name: "quackpipe"
asset_name: quackpipe-${{ matrix.goarch }}
executable_compression: upx
compress_assets: OFF
build_flags: -buildvcs=false
#ldflags: "-linkmode external -extldflags -static"
extra_files: LICENSE README.md
- name: Log in to the Container registry
uses: docker/login-action@v3.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5.3.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}