mirror of
https://github.com/docker/build-push-action.git
synced 2026-04-08 07:26:40 +00:00
fix test since secrets are not written to temp path anymore
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
3b7fd34174
commit
8eb0c6e0c0
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@ -445,6 +445,29 @@ jobs:
|
||||
MYSECRET=foo
|
||||
INVALID_SECRET=
|
||||
|
||||
secret-files:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
with:
|
||||
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
||||
driver-opts: |
|
||||
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
||||
-
|
||||
name: Build
|
||||
uses: ./
|
||||
with:
|
||||
context: .
|
||||
file: ./test/secret.Dockerfile
|
||||
secret-files: |
|
||||
MYSECRET=./test/secret.txt
|
||||
INVALID_SECRET=
|
||||
|
||||
secret-envs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@ -389,7 +389,7 @@ ccc`],
|
||||
'build',
|
||||
'--file', './test/Dockerfile',
|
||||
'--iidfile', imageIDFilePath,
|
||||
'--secret', `id=MY_SECRET,src=${tmpName}`,
|
||||
'--secret', `id=MY_SECRET,src=${path.join(fixturesDir, 'secret.txt')}`,
|
||||
'--builder', 'builder-git-context-2',
|
||||
'--network', 'host',
|
||||
'--push',
|
||||
|
||||
1
test/secret.txt
Normal file
1
test/secret.txt
Normal file
@ -0,0 +1 @@
|
||||
foo
|
||||
Loading…
Reference in New Issue
Block a user