Skip to content

Commit

Permalink
Use semver and PR branch name for Docker versions (#1486)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mxsasha authored Aug 19, 2024
1 parent 54b8bf5 commit 1ae6393
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ jobs:
run: |
pip -q install setuptools_scm
# '+' is not supported in Docker Image tags
echo "internetnl_version=$(python -m setuptools_scm)" | tr '+' '-'| tee -a "$GITHUB_OUTPUT"
scm_version=$(echo 'from setuptools_scm import get_version; print(get_version(version_scheme="release-branch-semver"))' | python)
branch_version_suffix=${GITHUB_HEAD_REF:+-$GITHUB_HEAD_REF}
echo "internetnl_version=$scm_version$branch_version_suffix" | tr '+' '-'| tee -a "$GITHUB_OUTPUT"
# login to pull images from Github registry
- name: Login to GitHub Container Registry
Expand Down

0 comments on commit 1ae6393

Please sign in to comment.