Skip to content

Fix missing commit-id into the binary version #5

Fix missing commit-id into the binary version

Fix missing commit-id into the binary version #5

Workflow file for this run

name: docker_image_and_release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+**
jobs:
docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
flavor: |
latest=true
tags: |
type=semver,pattern={{raw}}
labels: |
org.opencontainers.image.ref.name=${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MODE=docker_release
gh_release:
runs-on: ubuntu-latest
needs: docker_image
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- name: Build Project
run: |
GOOS=linux GOARCH=amd64 make release
GOOS=linux GOARCH=arm64 make release
GOOS=darwin GOARCH=amd64 make release
GOOS=darwin GOARCH=arm64 make release
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
with:
files: ./build/*