Skip to content

Commit

Permalink
Merge pull request #470 from Iceber/fix_image_version
Browse files Browse the repository at this point in the history
fix image version when multiple tags exist on HEAD
  • Loading branch information
Iceber authored Dec 8, 2022
2 parents cda43af + b636fa2 commit b1c2359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/push-images.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Push Images
on:
push:
branches:
- main
tags:
- v*
jobs:
Expand All @@ -25,4 +23,4 @@ jobs:
env:
ON_PLUGINS: true
run: |
REGISTRY="ghcr.io/$(echo ${{ github.repository }} | tr "A-Z" "a-z")" make push-images
REGISTRY="ghcr.io/$(echo ${{ github.repository }} | tr "A-Z" "a-z")" VERSION=${{ github.ref_name }} make push-images
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
RELEASE_ARCHS ?= amd64 arm64

VERSION ?= "latest"
LATEST_TAG=$(shell git describe --tags)
ifeq ($(LATEST_TAG),$(shell git describe --abbrev=0 --tags))
VERSION=$(LATEST_TAG)
VERSION ?= $(shell git tag --points-at HEAD --sort -version:refname "v*" | head -1)
ifeq ($(VERSION),)
VERSION="latest"
endif

BUILDER_IMAGE_TAG = $(shell git rev-parse HEAD)
Expand Down

0 comments on commit b1c2359

Please sign in to comment.