Skip to content

Commit

Permalink
ci: add explicit release version in docker build (#1412)
Browse files Browse the repository at this point in the history
Publishing builds the image, but the Makefile uses `git describe --tags`
for the version if the `RELEASE_VERSION` env var is not defined. And
this is an issue because the `.git` directory is not included in the
image (and it shouldn't be). Furthermore, the describe tags does not
reflect the proper version name.
  • Loading branch information
hf authored Feb 8, 2024
1 parent 14a3aeb commit b0d9a51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ jobs:
- uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64

- run: |
set -ex
echo "Adding explicit release version to Dockerfile..."
sed -i 's/RELEASE_VERSION=unspecified/RELEASE_VERSION=${{ inputs.version }}/' Dockerfile
- uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ RUN make deps

# Building stuff
COPY . /go/src/github.com/supabase/auth
RUN make build

# Make sure you change the RELEASE_VERSION value before publishing an image.
RUN RELEASE_VERSION=unspecified make build

FROM alpine:3.17
RUN adduser -D -u 1000 supabase
Expand Down

0 comments on commit b0d9a51

Please sign in to comment.