Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incorrect base url in admin-ui #1441

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
REPO_NAME: ${{ github.repository }}
# Have to be build variable
NEXT_PUBLIC_BASE_URL: ${{ inputs.base-url }}
# required because error pages use build time env vars, not runtime env vars
# it's the same on every environment
EMAIL_VARAAMO_EXT_LINK: "https://lomake.hel.fi/varaamo-palaute"

permissions:
contents: read
Expand Down Expand Up @@ -57,6 +60,8 @@ jobs:
- name: "Extract ui metadata (tags, labels) for Docker"
id: meta
uses: docker/metadata-action@v5
env:
DOCKER_METADATA_PR_HEAD_SHA: true
with:
images: ${{ steps.repo.outputs.repo }}
tags: |
Expand All @@ -65,16 +70,18 @@ jobs:
type=ref,event=branch,priority=1
labels: |
org.opencontainers.image.title=Tilavarauspalvelu ${{ env.BUILD_APP }}
org.opencontainers.image.description=Tilavarauspalvelu ${{ env.BUILD_APP }} ${{ github.ref_name }} (${{ github.sha }}).
org.opencontainers.image.description=Tilavarauspalvelu ${{ env.BUILD_APP }} ${{ github.ref_name }}.
org.opencontainers.image.version=${{ github.ref_name }}
org.opencontainers.image.revision=${{ github.sha }}

- name: "Build container"
uses: docker/build-push-action@v6
with:
context: .
push: true
build-args: APP=${{ env.BUILD_APP }}
build-args: |
APP=${{ env.BUILD_APP }}
NEXT_PUBLIC_BASE_URL=${{ env.NEXT_PUBLIC_BASE_URL }}
EMAIL_VARAAMO_EXT_LINK=${{ env.EMAIL_VARAAMO_EXT_LINK }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
# required because error pages use build time env vars, not runtime env vars
# it's the same on every environment
EMAIL_VARAAMO_EXT_LINK: "https://lomake.hel.fi/varaamo-palaute"

jobs:
# Build both ui and admin-ui dockers
build-ui-docker:
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ ARG APP
# Required because the client (js bundle) variables are compile time only
ARG NEXT_PUBLIC_TILAVARAUS_API_URL
ENV NEXT_PUBLIC_TILAVARAUS_API_URL=$NEXT_PUBLIC_TILAVARAUS_API_URL
ARG NEXT_PUBLIC_BASE_URL
ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
ARG EMAIL_VARAAMO_EXT_LINK
ENV EMAIL_VARAAMO_EXT_LINK=$EMAIL_VARAAMO_EXT_LINK
# Build should not fail on missing env variables
# TODO this should be removed because we need NEXT_PUBLIC_TILAVARAUS_API_URL to be set during build
# unless we let it be undefined and use "" as default value (does it work?)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"npkill": "^0.12.2",
"turbo": "^1.11.3"
},
"packageManager": "pnpm@9.1.4"
"packageManager": "pnpm@9.11.0"
}