Skip to content

Commit d23dc74

Browse files
committed
fix: issues with frontend build and labels
1 parent 48477ab commit d23dc74

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/backend-docker-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
cache-to: type=gha,mode=max,scope=backend-${{ matrix.platform }}
6161
platforms: ${{ matrix.platform }}
6262
provenance: false
63+
build-args: |
64+
REPOSITORY_URL=${{ github.server_url }}/${{ github.repository }}
6365
6466
merge:
6567
name: Create Multi-Arch Manifest

.github/workflows/frontend-docker-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
build-args: |
7070
NEXT_PUBLIC_UMBRACO_BASE_URL=${{ inputs.next_public_umbraco_base_url }}
7171
NEXT_PUBLIC_SITE_URL=${{ inputs.next_public_site_url }}
72+
REPOSITORY_URL=${{ github.server_url }}/${{ github.repository }}
7273
7374
merge:
7475
name: Create Multi-Arch Manifest

backend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ WORKDIR /app
2222
RUN mkdir -p wwwroot/media && mkdir -p umbraco/Data/TEMP
2323
COPY --from=publish /app/publish .
2424

25-
LABEL org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
25+
ARG REPOSITORY_URL
26+
LABEL org.opencontainers.image.source=${REPOSITORY_URL}
2627
LABEL org.opencontainers.image.description="MethodConf Backend - Umbraco CMS"
2728
LABEL org.opencontainers.image.licenses=MIT
2829

frontend/docker/prod.Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ COPY . .
2020

2121
# Public environment variables must be present at build time
2222
# https://github.com/vercel/next.js/discussions/14030
23-
# ARG NEXT_PUBLIC_ENV_VARIABLE
24-
# ENV NEXT_PUBLIC_ENV_VARIABLE=${NEXT_PUBLIC_ENV_VARIABLE}
23+
ARG NEXT_PUBLIC_UMBRACO_BASE_URL
24+
ENV NEXT_PUBLIC_UMBRACO_BASE_URL=${NEXT_PUBLIC_UMBRACO_BASE_URL}
25+
ARG NEXT_PUBLIC_SITE_URL
26+
ENV NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL}
2527

2628
# Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
2729
# Uncomment the following line to disable telemetry at build time
@@ -65,7 +67,8 @@ ENV NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL}
6567

6668
# Note: Don't expose ports here, Compose will handle that for us
6769

68-
LABEL org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
70+
ARG REPOSITORY_URL
71+
LABEL org.opencontainers.image.source=${REPOSITORY_URL}
6972
LABEL org.opencontainers.image.description="MethodConf Frontend - Next.js"
7073
LABEL org.opencontainers.image.licenses=MIT
7174

0 commit comments

Comments
 (0)