Skip to content

Commit 1a71e15

Browse files
github: Read tag on HEAD in Github Actions
Running `git describe` in local setup correctly identifies the tag available on the tag. But `docker buildx` via actions does not identify it without `--tags` param. Reference Issue: #7626 Changelog-Fixed: Docker image created via github actions correctly reads the tag available on the HEAD.
1 parent ad37328 commit 1a71e15

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737

3838
- name: Check version tag
3939
run: >-
40-
git describe --always --dirty=-modded --abbrev=7
40+
git describe --tags --always --dirty=-modded --abbrev=7
4141
4242
- name: Setup Version
4343
env:
4444
WORKDIR: ${{ matrix.WORKDIR }}
4545
run: |
46-
echo "VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')" >> $GITHUB_ENV
46+
echo "VERSION=$(git describe --tags --abbrev=0).post$(git describe --tags --abbrev=1 | awk -F "-" '{print $2}')" >> $GITHUB_ENV
4747
4848
- name: Set up values
4949
id: set-values
@@ -90,7 +90,7 @@ jobs:
9090
run: |
9191
echo "POETRY VERSION PUBLISH: $(poetry --version)"
9292
cd ${{ env.WORKDIR }}
93-
export VERSION=$(git describe --abbrev=0)
93+
export VERSION=$(git describe --tags --abbrev=0)
9494
echo "Pyln VERSION: $VERSION"
9595
make upgrade-version NEW_VERSION=$VERSION
9696
python3 -m pip config set global.timeout 150

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/make
22

33
# Extract version from git, or if we're from a zipfile, use dirname
4-
VERSION=$(shell git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|\1|gp')
4+
VERSION=$(shell git describe --tags --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|\1|gp')
55

66
# Next release.
77
CLN_NEXT_VERSION := v24.08

tools/repro-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ else
5454
fi
5555

5656
PLATFORM="$OS"-"$VER"
57-
VERSION=${FORCE_VERSION:-$(git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p')}
57+
VERSION=${FORCE_VERSION:-$(git describe --tags --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p')}
5858

5959
# eg. ## [0.6.3] - 2019-01-09: "The Smallblock Conspiracy"
6060
# Skip 'v' here in $VERSION

0 commit comments

Comments
 (0)