Skip to content

Commit

Permalink
Fix environment variables handling
Browse files Browse the repository at this point in the history
  • Loading branch information
FinemechanicPub committed Aug 13, 2024
1 parent 484c434 commit 9819c2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"GITHUB_REF=${{ github.ref }}"
"GITHUB_SHA=${{ github.sha }}"
# This step generates an artifact attestation for the image,
# which is an unforgeable statement about where and how it was built.
Expand Down
2 changes: 2 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ COPY ./manage.py ./manage.py
# Swith user
USER puzzle
# Set variables
ARG GITHUB_REF
ARG GITHUB_SHA
ENV BRANCH=${GITHUB_REF}
ENV COMMIT=${GITHUB_SHA}
# Run server
Expand Down

0 comments on commit 9819c2f

Please sign in to comment.