mirror of
https://github.com/docker/build-push-action
synced 2024-11-10 05:21:40 +00:00
Merge pull request #1121 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.23.0
chore(deps): Bump @docker/actions-toolkit from 0.22.0 to 0.23.0
This commit is contained in:
commit
df19a799eb
8 changed files with 98 additions and 89 deletions
|
@ -1,12 +1,15 @@
|
||||||
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
|
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import {Builder} from '@docker/actions-toolkit/lib/buildx/builder';
|
import {Builder} from '@docker/actions-toolkit/lib/buildx/builder';
|
||||||
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
|
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
|
||||||
|
import {Build} from '@docker/actions-toolkit/lib/buildx/build';
|
||||||
import {Context} from '@docker/actions-toolkit/lib/context';
|
import {Context} from '@docker/actions-toolkit/lib/context';
|
||||||
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
||||||
import {GitHub} from '@docker/actions-toolkit/lib/github';
|
import {GitHub} from '@docker/actions-toolkit/lib/github';
|
||||||
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
|
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
|
||||||
|
|
||||||
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/builder';
|
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/builder';
|
||||||
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github';
|
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github';
|
||||||
|
|
||||||
|
@ -35,6 +38,16 @@ jest.spyOn(Docker, 'isAvailable').mockImplementation(async (): Promise<boolean>
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const metadataJson = path.join(tmpDir, 'metadata.json');
|
||||||
|
jest.spyOn(Build.prototype, 'getMetadataFilePath').mockImplementation((): string => {
|
||||||
|
return metadataJson;
|
||||||
|
});
|
||||||
|
|
||||||
|
const imageIDFilePath = path.join(tmpDir, 'iidfile.txt');
|
||||||
|
jest.spyOn(Build.prototype, 'getImageIDFilePath').mockImplementation((): string => {
|
||||||
|
return imageIDFilePath;
|
||||||
|
});
|
||||||
|
|
||||||
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
|
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
|
||||||
return {
|
return {
|
||||||
name: 'builder2',
|
name: 'builder2',
|
||||||
|
@ -78,7 +91,7 @@ describe('getArgs', () => {
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -101,7 +114,7 @@ ccc"`],
|
||||||
'--build-arg', 'MY_ARG=val1,val2,val3',
|
'--build-arg', 'MY_ARG=val1,val2,val3',
|
||||||
'--build-arg', 'ARG=val',
|
'--build-arg', 'ARG=val',
|
||||||
'--build-arg', `MULTILINE=aaaa\nbbbb\nccc`,
|
'--build-arg', `MULTILINE=aaaa\nbbbb\nccc`,
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'https://github.com/docker/build-push-action.git#refs/heads/master'
|
'https://github.com/docker/build-push-action.git#refs/heads/master'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -117,7 +130,7 @@ ccc"`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--tag', 'name/app:7.4',
|
'--tag', 'name/app:7.4',
|
||||||
'--tag', 'name/app:latest',
|
'--tag', 'name/app:latest',
|
||||||
'https://github.com/docker/build-push-action.git#refs/heads/master'
|
'https://github.com/docker/build-push-action.git#refs/heads/master'
|
||||||
|
@ -172,7 +185,7 @@ ccc"`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -189,7 +202,7 @@ ccc"`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
|
@ -230,7 +243,7 @@ ccc"`],
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--file', './test/Dockerfile',
|
'--file', './test/Dockerfile',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--platform', 'linux/amd64,linux/arm64',
|
'--platform', 'linux/amd64,linux/arm64',
|
||||||
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
||||||
'--builder', 'builder-git-context-2',
|
'--builder', 'builder-git-context-2',
|
||||||
|
@ -264,7 +277,7 @@ ccc"`],
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--file', './test/Dockerfile',
|
'--file', './test/Dockerfile',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--platform', 'linux/amd64,linux/arm64',
|
'--platform', 'linux/amd64,linux/arm64',
|
||||||
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
||||||
'--secret', `id=MYSECRET,src=${tmpName}`,
|
'--secret', `id=MYSECRET,src=${tmpName}`,
|
||||||
|
@ -301,7 +314,7 @@ ccc`],
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--file', './test/Dockerfile',
|
'--file', './test/Dockerfile',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--platform', 'linux/amd64,linux/arm64',
|
'--platform', 'linux/amd64,linux/arm64',
|
||||||
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
||||||
'--secret', `id=MYSECRET,src=${tmpName}`,
|
'--secret', `id=MYSECRET,src=${tmpName}`,
|
||||||
|
@ -330,7 +343,7 @@ ccc`],
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--file', './test/Dockerfile',
|
'--file', './test/Dockerfile',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--secret', `id=MY_SECRET,src=${tmpName}`,
|
'--secret', `id=MY_SECRET,src=${tmpName}`,
|
||||||
'--builder', 'builder-git-context-2',
|
'--builder', 'builder-git-context-2',
|
||||||
'--network', 'host',
|
'--network', 'host',
|
||||||
|
@ -377,8 +390,8 @@ ccc`],
|
||||||
'--add-host', 'docker:10.180.0.1',
|
'--add-host', 'docker:10.180.0.1',
|
||||||
'--add-host', 'foo:10.0.0.1',
|
'--add-host', 'foo:10.0.0.1',
|
||||||
'--file', './test/Dockerfile',
|
'--file', './test/Dockerfile',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'--network', 'host',
|
'--network', 'host',
|
||||||
'--push',
|
'--push',
|
||||||
'.'
|
'.'
|
||||||
|
@ -406,11 +419,11 @@ nproc=3`],
|
||||||
'--add-host', 'foo:10.0.0.1',
|
'--add-host', 'foo:10.0.0.1',
|
||||||
'--cgroup-parent', 'foo',
|
'--cgroup-parent', 'foo',
|
||||||
'--file', './test/Dockerfile',
|
'--file', './test/Dockerfile',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--shm-size', '2g',
|
'--shm-size', '2g',
|
||||||
'--ulimit', 'nofile=1024:1024',
|
'--ulimit', 'nofile=1024:1024',
|
||||||
'--ulimit', 'nproc=3',
|
'--ulimit', 'nproc=3',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -426,8 +439,8 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'https://github.com/docker/build-push-action.git#refs/heads/master:docker'
|
'https://github.com/docker/build-push-action.git#refs/heads/master:docker'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -444,9 +457,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'https://github.com/docker/build-push-action.git#refs/heads/master:subdir'
|
'https://github.com/docker/build-push-action.git#refs/heads/master:subdir'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -463,8 +476,8 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -480,9 +493,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -499,9 +512,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', `type=provenance,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -518,9 +531,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -537,9 +550,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', 'type=provenance,disabled=true',
|
'--attest', 'type=provenance,disabled=true',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -556,9 +569,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', 'type=provenance,builder-id=foo',
|
'--attest', 'type=provenance,builder-id=foo',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -575,9 +588,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
"--output", 'type=docker',
|
"--output", 'type=docker',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -593,9 +606,9 @@ nproc=3`],
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--load',
|
'--load',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -613,9 +626,9 @@ nproc=3`],
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--build-arg', 'FOO=bar#baz',
|
'--build-arg', 'FOO=bar#baz',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--load',
|
'--load',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -635,9 +648,9 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
'build',
|
'build',
|
||||||
'--secret', 'id=MY_SECRET,env=MY_SECRET_ENV',
|
'--secret', 'id=MY_SECRET,env=MY_SECRET_ENV',
|
||||||
'--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV',
|
'--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--load',
|
'--load',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -656,9 +669,9 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
'build',
|
'build',
|
||||||
'--secret', 'id=MY_SECRET,env=MY_SECRET_ENV',
|
'--secret', 'id=MY_SECRET,env=MY_SECRET_ENV',
|
||||||
'--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV',
|
'--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--load',
|
'--load',
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -678,7 +691,7 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
'build',
|
'build',
|
||||||
'--output', 'type=local,dest=./release-out',
|
'--output', 'type=local,dest=./release-out',
|
||||||
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -702,7 +715,7 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
'--annotation', 'manifest-descriptor[linux/amd64]:example4=zzz',
|
'--annotation', 'manifest-descriptor[linux/amd64]:example4=zzz',
|
||||||
'--output', 'type=local,dest=./release-out',
|
'--output', 'type=local,dest=./release-out',
|
||||||
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -719,10 +732,10 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
"--output", `type=image,"name=localhost:5000/name/app:latest,localhost:5000/name/app:foo",push-by-digest=true,name-canonical=true,push=true`,
|
"--output", `type=image,"name=localhost:5000/name/app:latest,localhost:5000/name/app:foo",push-by-digest=true,name-canonical=true,push=true`,
|
||||||
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -740,10 +753,10 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--attest', `type=sbom,disabled=false`,
|
'--attest', `type=sbom,disabled=false`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -761,9 +774,9 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -780,9 +793,9 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
|
||||||
]),
|
]),
|
||||||
[
|
[
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', path.join(tmpDir, 'iidfile'),
|
'--iidfile', imageIDFilePath,
|
||||||
'--attest', `type=provenance,mode=min,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
'--attest', `type=provenance,mode=min,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
'--metadata-file', metadataJson,
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
19
dist/licenses.txt
generated
vendored
19
dist/licenses.txt
generated
vendored
|
@ -3855,25 +3855,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
yallist
|
|
||||||
ISC
|
|
||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
zip-stream
|
zip-stream
|
||||||
MIT
|
MIT
|
||||||
Copyright (c) 2014 Chris Talkington, contributors.
|
Copyright (c) 2014 Chris Talkington, contributors.
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"packageManager": "yarn@3.6.3",
|
"packageManager": "yarn@3.6.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@docker/actions-toolkit": "0.22.0",
|
"@docker/actions-toolkit": "0.23.0",
|
||||||
"handlebars": "^4.7.7"
|
"handlebars": "^4.7.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -136,7 +136,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
|
||||||
args.push('--file', inputs.file);
|
args.push('--file', inputs.file);
|
||||||
}
|
}
|
||||||
if (!Build.hasLocalExporter(inputs.outputs) && !Build.hasTarExporter(inputs.outputs) && (inputs.platforms.length == 0 || (await toolkit.buildx.versionSatisfies('>=0.4.2')))) {
|
if (!Build.hasLocalExporter(inputs.outputs) && !Build.hasTarExporter(inputs.outputs) && (inputs.platforms.length == 0 || (await toolkit.buildx.versionSatisfies('>=0.4.2')))) {
|
||||||
args.push('--iidfile', Build.getImageIDFilePath());
|
args.push('--iidfile', toolkit.buildxBuild.getImageIDFilePath());
|
||||||
}
|
}
|
||||||
await Util.asyncForEach(inputs.labels, async label => {
|
await Util.asyncForEach(inputs.labels, async label => {
|
||||||
args.push('--label', label);
|
args.push('--label', label);
|
||||||
|
@ -199,7 +199,7 @@ async function getCommonArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<st
|
||||||
args.push('--load');
|
args.push('--load');
|
||||||
}
|
}
|
||||||
if (await toolkit.buildx.versionSatisfies('>=0.6.0')) {
|
if (await toolkit.buildx.versionSatisfies('>=0.6.0')) {
|
||||||
args.push('--metadata-file', Build.getMetadataFilePath());
|
args.push('--metadata-file', toolkit.buildxBuild.getMetadataFilePath());
|
||||||
}
|
}
|
||||||
if (inputs.network) {
|
if (inputs.network) {
|
||||||
args.push('--network', inputs.network);
|
args.push('--network', inputs.network);
|
||||||
|
|
|
@ -4,7 +4,6 @@ import * as stateHelper from './state-helper';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as actionsToolkit from '@docker/actions-toolkit';
|
import * as actionsToolkit from '@docker/actions-toolkit';
|
||||||
|
|
||||||
import {Build} from '@docker/actions-toolkit/lib/buildx/build';
|
|
||||||
import {Context} from '@docker/actions-toolkit/lib/context';
|
import {Context} from '@docker/actions-toolkit/lib/context';
|
||||||
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
||||||
import {Exec} from '@docker/actions-toolkit/lib/exec';
|
import {Exec} from '@docker/actions-toolkit/lib/exec';
|
||||||
|
@ -91,9 +90,9 @@ actionsToolkit.run(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const imageID = Build.resolveImageID();
|
const imageID = toolkit.buildxBuild.resolveImageID();
|
||||||
const metadata = Build.resolveMetadata();
|
const metadata = toolkit.buildxBuild.resolveMetadata();
|
||||||
const digest = Build.resolveDigest();
|
const digest = toolkit.buildxBuild.resolveDigest();
|
||||||
|
|
||||||
if (imageID) {
|
if (imageID) {
|
||||||
await core.group(`ImageID`, async () => {
|
await core.group(`ImageID`, async () => {
|
||||||
|
|
34
yarn.lock
34
yarn.lock
|
@ -1055,9 +1055,9 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@docker/actions-toolkit@npm:0.22.0":
|
"@docker/actions-toolkit@npm:0.23.0":
|
||||||
version: 0.22.0
|
version: 0.23.0
|
||||||
resolution: "@docker/actions-toolkit@npm:0.22.0"
|
resolution: "@docker/actions-toolkit@npm:0.23.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/artifact": ^2.1.7
|
"@actions/artifact": ^2.1.7
|
||||||
"@actions/cache": ^3.2.4
|
"@actions/cache": ^3.2.4
|
||||||
|
@ -1071,12 +1071,12 @@ __metadata:
|
||||||
"@octokit/core": ^5.1.0
|
"@octokit/core": ^5.1.0
|
||||||
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
|
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
|
||||||
async-retry: ^1.3.3
|
async-retry: ^1.3.3
|
||||||
csv-parse: ^5.5.5
|
csv-parse: ^5.5.6
|
||||||
handlebars: ^4.7.8
|
handlebars: ^4.7.8
|
||||||
jwt-decode: ^4.0.0
|
jwt-decode: ^4.0.0
|
||||||
semver: ^7.6.0
|
semver: ^7.6.2
|
||||||
tmp: ^0.2.3
|
tmp: ^0.2.3
|
||||||
checksum: 860bfe0f4b161181ffae47a9f82612b5d812b0197f582f5308fc80e8e3c55a47595134619cc7805df71a79a891fd10b6b1c4fb95c498423df1ea82a5fd84b44e
|
checksum: 7bac57e9d1af6214a16509051d7ac1f276880f332d44a0d52a3d9d3601204c0cbf9a23933772c5a0974e705d4295b32d036c4d37afe8965330d8f116df07faac
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -3113,13 +3113,20 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"csv-parse@npm:*, csv-parse@npm:^5.5.5":
|
"csv-parse@npm:*":
|
||||||
version: 5.5.5
|
version: 5.5.5
|
||||||
resolution: "csv-parse@npm:5.5.5"
|
resolution: "csv-parse@npm:5.5.5"
|
||||||
checksum: 9e76b3dc3dbbf0a9b1c3529843e3891f0da23d094bdb0540a3d8f4083d00110dd545399f9cf510498def6c1fc7012cc6bc00046d281f16d705add64099467973
|
checksum: 9e76b3dc3dbbf0a9b1c3529843e3891f0da23d094bdb0540a3d8f4083d00110dd545399f9cf510498def6c1fc7012cc6bc00046d281f16d705add64099467973
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"csv-parse@npm:^5.5.6":
|
||||||
|
version: 5.5.6
|
||||||
|
resolution: "csv-parse@npm:5.5.6"
|
||||||
|
checksum: ee06f97f674487dc1d001b360de8ea510a41b9d971abf43bcf9c3be22c83a3634df0d3ebfbe52fd49d145077066be7ff9f25de3fc6b71aefb973099b04147a25
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"debug@npm:4, debug@npm:^4.3.4":
|
"debug@npm:4, debug@npm:^4.3.4":
|
||||||
version: 4.3.4
|
version: 4.3.4
|
||||||
resolution: "debug@npm:4.3.4"
|
resolution: "debug@npm:4.3.4"
|
||||||
|
@ -3260,7 +3267,7 @@ __metadata:
|
||||||
resolution: "docker-build-push@workspace:."
|
resolution: "docker-build-push@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/core": ^1.10.1
|
"@actions/core": ^1.10.1
|
||||||
"@docker/actions-toolkit": 0.22.0
|
"@docker/actions-toolkit": 0.23.0
|
||||||
"@types/csv-parse": ^1.2.2
|
"@types/csv-parse": ^1.2.2
|
||||||
"@types/node": ^20.5.9
|
"@types/node": ^20.5.9
|
||||||
"@typescript-eslint/eslint-plugin": ^6.6.0
|
"@typescript-eslint/eslint-plugin": ^6.6.0
|
||||||
|
@ -6064,7 +6071,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0":
|
"semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4":
|
||||||
version: 7.6.0
|
version: 7.6.0
|
||||||
resolution: "semver@npm:7.6.0"
|
resolution: "semver@npm:7.6.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6075,6 +6082,15 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"semver@npm:^7.6.2":
|
||||||
|
version: 7.6.2
|
||||||
|
resolution: "semver@npm:7.6.2"
|
||||||
|
bin:
|
||||||
|
semver: bin/semver.js
|
||||||
|
checksum: 40f6a95101e8d854357a644da1b8dd9d93ce786d5c6a77227bc69dbb17bea83d0d1d1d7c4cd5920a6df909f48e8bd8a5909869535007f90278289f2451d0292d
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"shebang-command@npm:^2.0.0":
|
"shebang-command@npm:^2.0.0":
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
resolution: "shebang-command@npm:2.0.0"
|
resolution: "shebang-command@npm:2.0.0"
|
||||||
|
|
Loading…
Reference in a new issue