Skip to content

Commit 1ae6393

Browse files
authored
Use semver and PR branch name for Docker versions (#1486)
The existing config would use "1.8-something" for things built off main, which is more appropriately 1.9-dev. If it's not on main, this also adds the branch name, so it's instant to see in a deployed instance which feature branch it is running.
1 parent 54b8bf5 commit 1ae6393

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ jobs:
7777
run: |
7878
pip -q install setuptools_scm
7979
# '+' is not supported in Docker Image tags
80-
echo "internetnl_version=$(python -m setuptools_scm)" | tr '+' '-'| tee -a "$GITHUB_OUTPUT"
80+
scm_version=$(echo 'from setuptools_scm import get_version; print(get_version(version_scheme="release-branch-semver"))' | python)
81+
branch_version_suffix=${GITHUB_HEAD_REF:+-$GITHUB_HEAD_REF}
82+
echo "internetnl_version=$scm_version$branch_version_suffix" | tr '+' '-'| tee -a "$GITHUB_OUTPUT"
8183
8284
# login to pull images from Github registry
8385
- name: Login to GitHub Container Registry

0 commit comments

Comments
 (0)