File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 8686 with :
8787 load : true # just build, no push
8888 tags : smartonfhir/cumulus-etl:latest
89+ build-args : |
90+ LOCAL_VERSION=${{ github.sha }}
8991
9092 - name : Download NLP images
9193 run : |
Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ jobs:
2929 password : ${{ secrets.DOCKERHUB_TOKEN }}
3030
3131 - name : Build and push image to Docker Hub
32- uses : docker/build-push-action@v5
32+ uses : docker/build-push-action@v6
3333 with :
3434 push : true
3535 platforms : |
3636 linux/amd64
3737 linux/arm64
3838 tags : ${{ steps.meta.outputs.tags }}
3939 labels : ${{ steps.meta.outputs.labels }}
40+ build-args : |
41+ LOCAL_VERSION=${{ github.sha }}
Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ RUN pip3 install nltk
3838RUN python3 -m nltk.downloader -d /usr/local/share/nltk_data averaged_perceptron_tagger
3939
4040COPY . /app
41+
42+ # A local version is the trailing bit of a Python version after a plus sign, like 5.0+ubuntu1.
43+ # We use it here mostly to inject a git commit sha when building from git.
44+ ARG LOCAL_VERSION
45+ RUN [ -z "$LOCAL_VERSION" ] || sed -i "s/\( __version__.*\)\" /\1 +$LOCAL_VERSION\" /" /app/cumulus_etl/__init__.py
46+ # Print the final version we're using
47+ RUN grep __version__ /app/cumulus_etl/__init__.py
48+
4149RUN --mount=type=cache,target=/root/.cache \
4250 pip3 install /app
4351RUN rm -r /app
You can’t perform that action at this time.
0 commit comments