File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 84
84
scm_version=$(echo 'from setuptools_scm import get_version; print(get_version(version_scheme="release-branch-semver"))' | python)
85
85
branch_version_suffix=${GITHUB_HEAD_REF:+-$GITHUB_HEAD_REF}
86
86
echo "internetnl_version=$scm_version$branch_version_suffix" | tr '+' '-'| tr '/' '-' | tee -a "$GITHUB_OUTPUT"
87
+ # generate docker image tag used for PR specific caching and PR specific auto deploy
88
+ echo "github_ref_name_slug=${{github.ref_name}}" | tr '+' '-'| tr '/' '-' | tee -a "$GITHUB_OUTPUT"
87
89
88
90
# login to pull images from Github registry
89
91
- name : Login to GitHub Container Registry
@@ -119,11 +121,11 @@ jobs:
119
121
# and tag with PR source branch (eg: feature-x)
120
122
tags : |
121
123
${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:${{ steps.get_version.outputs.internetnl_version }}
122
- ${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:pr- ${{ github.event_name == 'pull_request' && github.event.number || github.ref_name }}
124
+ ${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:${{ steps.get_version.outputs.github_ref_name_slug }}
123
125
# use latest build from main, or image previously build by this PR for caching
124
126
cache-from : |
125
127
${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:main
126
- ${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:pr- ${{ github.event_name == 'pull_request' && github.event.number || github.ref_name }}
128
+ ${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:${{ steps.get_version.outputs.github_ref_name_slug }}
127
129
# push images to registry
128
130
push : true
129
131
# makes build images better usable as cache by allowing individual layers to be pulled from cache
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ This variable can be set to either of these values:
276
276
277
277
- ` latest ` : update to latest stable release: https://github.com/internetstandards/Internet.nl/releases
278
278
- ` main ` : update to latest release on the ` main ` branch
279
- - ` pr- <NUMBER>` : update to the latest build of that Pull Request number
279
+ - ` <NUMBER>-merge ` : update to the latest build of that Pull Request number
280
280
281
281
Auto upgrades are performed by the ` cron-docker ` container/service. Progress/errors can be viewed by inspecting the container's logs:
282
282
You can’t perform that action at this time.
0 commit comments