.github/workflows/release.yml #57
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
- uses: lmangani/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
goversion: "https://dl.google.com/go/go1.22.7.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/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |