Skip to content

Commit

Permalink
ci: fix unspecified version at runtime in docker images (#1903)
Browse files Browse the repository at this point in the history
Docker images are built with the `vunspecified` version, which comes
because the release step does not use the current [Git context of the
buildx
action](https://github.com/docker/build-push-action?tab=readme-ov-file#git-context):

> Be careful because any file mutation in the steps that precede the
build step will be ignored, including processing of the .dockerignore
file since the context is based on the Git reference. However, you can
use the [Path
context](https://github.com/docker/build-push-action?tab=readme-ov-file#path-context)
using the [context
input](https://github.com/docker/build-push-action?tab=readme-ov-file#inputs)
alongside the [actions/checkout](https://github.com/actions/checkout/)
action to remove this restriction.
  • Loading branch information
hf authored Jan 6, 2025
1 parent 307892f commit 0611897
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:

- uses: docker/build-push-action@v3
with:
context: . # IMPORTANT: Dockerfile is modified above to include the release version. Don't remove this line: https://github.com/docker/build-push-action?tab=readme-ov-file#git-context
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit 0611897

Please sign in to comment.