Skip to content

Commit d72cc86

Browse files
committed
fix(secret): correct format for docker build action
1 parent 55e1079 commit d72cc86

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.github/actions/build-release-image/action.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ runs:
5555

5656
- name: Build and push image
5757
uses: docker/build-push-action@v6
58-
env:
59-
PUBLIC_TOKEN: ${{ inputs.public_token }}
6058
with:
6159
secrets: |
62-
id=PUBLIC_TOKEN,env=PUBLIC_TOKEN
60+
"PUBLIC_PACKAGES_TOKEN=${{ inputs.public_token }}"
6361
build-args: |
6462
VERSION=${{ inputs.upstream_version }}
6563
CHANNEL=${{ inputs.channel }}

.github/actions/build-test-image/action.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ runs:
2929

3030
- name: Build Docker image (test)
3131
uses: docker/build-push-action@v6
32-
env:
33-
PUBLIC_TOKEN: ${{ inputs.public_token }}
3432
with:
3533
secrets: |
36-
id=PUBLIC_TOKEN,env=PUBLIC_TOKEN
34+
"PUBLIC_PACKAGES_TOKEN=${{ inputs.public_token }}"
3735
build-args: |
3836
VERSION=${{ inputs.upstream_version }}
3937
CHANNEL=${{ inputs.channel }}

apps/cleanuparr/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ ARG PACKAGES_USERNAME=ipromknight
2424
WORKDIR /app
2525
COPY --from=cloner /src/code/backend/ ./backend/
2626

27-
RUN --mount=type=secret,id=PUBLIC_TOKEN \
27+
RUN --mount=type=secret,id=PUBLIC_PACKAGES_TOKEN,env=PUBLIC_PACKAGES_TOKEN \
2828
dotnet nuget add source \
2929
--name Cleanuparr \
3030
--username "${PACKAGES_USERNAME}" \
31-
--password "$(cat /run/secrets/PUBLIC_TOKEN)" \
31+
--password "${PUBLIC_PACKAGES_TOKEN}" \
3232
--store-password-in-clear-text \
3333
https://nuget.pkg.github.com/Cleanuparr/index.json \
3434
&& dotnet restore -a $TARGETARCH ./backend/Cleanuparr.Api/Cleanuparr.Api.csproj \

0 commit comments

Comments
 (0)