File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed
Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 4646 file : container/Dockerfile
4747 push : true
4848 platforms : linux/amd64
49- build-args : |
50- GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
49+ secrets : |
50+ # Optionally replace secrets.GITHUB_TOKEN with a PAT (store it under the same secret name
51+ # or adjust this mapping) to avoid 401 responses and heavy rate limiting when the pipeline
52+ # fetches metadata for thousands of modules.
53+ github_token=${{ secrets.GITHUB_TOKEN }}
5154 tags : ${{ steps.meta.outputs.image }}
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.7
2+
13FROM node:24-slim AS builder
24
35RUN apt-get update \
@@ -8,12 +10,18 @@ WORKDIR /workspace
810
911COPY . .
1012
11- ARG GITHUB_TOKEN WIKI_FILE
12- RUN << EOF
13+ ARG WIKI_FILE
14+ RUN --mount=type=secret,id=github_token << ' EOF'
1315set -e
1416git config --global --add safe.directory /workspace
1517git log -1
16- export GITHUB_TOKEN="${GITHUB_TOKEN}"
18+ TOKEN_FILE="/run/secrets/github_token"
19+ if [ -f "$TOKEN_FILE" ]; then
20+ GITHUB_TOKEN_VALUE="$(cat " $TOKEN_FILE")"
21+ if [ -n "$GITHUB_TOKEN_VALUE" ]; then
22+ export GITHUB_TOKEN="$GITHUB_TOKEN_VALUE"
23+ fi
24+ fi
1725npm clean-install
1826node --run all
1927EOF
Original file line number Diff line number Diff line change 4040 " NOASSERTION" ,
4141 " omxplayer" ,
4242 " openweathermap" ,
43+ " pipefail" ,
4344 " ptrbld" ,
4445 " ratp" ,
4546 " refspecs" ,
You can’t perform that action at this time.
0 commit comments