Skip to content

fix: display correct version when build version is not set #164

fix: display correct version when build version is not set

fix: display correct version when build version is not set #164

Workflow file for this run

name: Build Binaries
on: [ push ]
jobs:
test:
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ ubuntu-latest, macOS-latest ]
architecture: [ arm64, amd64 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update -qq
- name: Set up Go
uses: actions/[email protected]
with:
go-version-file: go.mod
- name: Run lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run tests
run: make test
build-docker-n-publish:
runs-on: ubuntu-latest
needs: test
permissions:
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Define the tag for the Docker image
# actions/checkout is making a shallow copy, so unless it's a tag event,
# tag will be empty; in such case, use shortened commit SHA
id: tag
run: echo "TAG=$(git describe --tags || git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
with:
context: .
file: ./build/Dockerfile
push: false
provenance: false
tags: ghcr.io/qase-tms/qase-cli:${{ env.TAG }},ghcr.io/qase-tms/qase-cli:latest
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ env.TAG }}