File tree 2 files changed +6
-0
lines changed 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 55
55
runs-on : ubuntu-latest
56
56
steps :
57
57
- uses : actions/checkout@v3
58
+ # fetch all commits instead of only the last as some branches are long lived and could have many between versions
59
+ # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
60
+ - run : git fetch --unshallow --quiet --tags --force
58
61
- uses : docker/setup-qemu-action@v2
59
62
- uses : docker/setup-buildx-action@v2
60
63
- name : Get cleaned branch name
Original file line number Diff line number Diff line change 79
79
STORED_VERSION_FILE := VERSION
80
80
HUGO_VERSION ?= 0.111.3
81
81
82
+ GITHUB_REF_TYPE ?= branch
83
+ GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
84
+
82
85
ifneq ($(GITHUB_REF_TYPE ) ,branch)
83
86
VERSION ?= $(subst v,,$(GITHUB_REF_NAME))
84
87
GITEA_VERSION ?= $(GITHUB_REF_NAME)
You can’t perform that action at this time.
0 commit comments