File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 with :
3434 context : .
3535 push : true
36- tags : ${{ steps.meta.outputs.tags }}
36+ tags : ${{ steps.meta.outputs.tags }}
37+ build-args : |
38+ GITHUB_ACTOR=${{ github.actor }}
39+ GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -12,8 +12,16 @@ RUN npm run build
1212# ─── Stage 2: Build backend ────────────────────────────────────────────────
1313FROM maven:3.9-eclipse-temurin-17-alpine AS backend-builder
1414
15+ ARG GITHUB_ACTOR
16+ ARG GITHUB_TOKEN
17+
1518WORKDIR /app
1619
20+ # Configure Maven to use GitHub Packages if GITHUB_TOKEN is provided
21+ RUN if [ -n "${GITHUB_TOKEN}" ]; then \
22+ mkdir -p /root/.m2 && printf '<settings>\n <servers>\n <server>\n <id>github</id>\n <username>%s</username>\n <password>%s</password>\n </server>\n </servers>\n </settings>\n ' "${GITHUB_ACTOR}" "${GITHUB_TOKEN}" > /root/.m2/settings.xml; \
23+ fi
24+
1725COPY pom.xml ./
1826RUN mvn dependency:go-offline -q
1927
You can’t perform that action at this time.
0 commit comments