mirror of
https://gitee.com/actions-mirror/docker-setup-buildx-action.git
synced 2024-11-23 05:40:43 +08:00
Merge pull request #370 from docker/dependabot/npm_and_yarn/actions/core-1.11.1
build(deps): bump @actions/core from 1.10.1 to 1.11.1
This commit is contained in:
commit
460e45646d
@ -1,7 +1,6 @@
|
||||
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as uuid from 'uuid';
|
||||
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
|
||||
import {Context} from '@docker/actions-toolkit/lib/context';
|
||||
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
||||
@ -26,8 +25,12 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
||||
return tmpName;
|
||||
});
|
||||
|
||||
jest.mock('uuid');
|
||||
jest.spyOn(uuid, 'v4').mockReturnValue('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');
|
||||
jest.mock('crypto', () => {
|
||||
return {
|
||||
...(jest.requireActual('crypto') as object),
|
||||
randomUUID: jest.fn(() => '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d')
|
||||
};
|
||||
});
|
||||
|
||||
jest.spyOn(Docker, 'context').mockImplementation((): Promise<string> => {
|
||||
return Promise.resolve('default');
|
||||
|
28
dist/index.js
generated
vendored
28
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
@ -25,10 +25,9 @@
|
||||
"license": "Apache-2.0",
|
||||
"packageManager": "yarn@3.6.3",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@docker/actions-toolkit": "^0.39.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"uuid": "^10.0.0"
|
||||
"js-yaml": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as uuid from 'uuid';
|
||||
import * as crypto from 'crypto';
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
||||
@ -47,7 +47,7 @@ export async function getInputs(): Promise<Inputs> {
|
||||
}
|
||||
|
||||
export async function getBuilderName(driver: string): Promise<string> {
|
||||
return driver == 'docker' ? await Docker.context() : `builder-${uuid.v4()}`;
|
||||
return driver == 'docker' ? await Docker.context() : `builder-${crypto.randomUUID()}`;
|
||||
}
|
||||
|
||||
export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
|
||||
@ -84,7 +84,7 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
|
||||
if (node.name) {
|
||||
args.push('--node', node.name);
|
||||
} else if (inputs.driver == 'kubernetes' && (await toolkit.buildx.versionSatisfies('<0.11.0'))) {
|
||||
args.push('--node', `node-${uuid.v4()}`);
|
||||
args.push('--node', `node-${crypto.randomUUID()}`);
|
||||
}
|
||||
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
|
||||
await Util.asyncForEach(node['driver-opts'], async (driverOpt: string) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as crypto from 'crypto';
|
||||
import * as fs from 'fs';
|
||||
import * as yaml from 'js-yaml';
|
||||
import * as uuid from 'uuid';
|
||||
import * as core from '@actions/core';
|
||||
import * as actionsToolkit from '@docker/actions-toolkit';
|
||||
|
||||
@ -98,7 +98,7 @@ actionsToolkit.run(
|
||||
});
|
||||
});
|
||||
if (defaultContextWithTLS) {
|
||||
const tmpDockerContext = `buildx-${uuid.v4()}`;
|
||||
const tmpDockerContext = `buildx-${crypto.randomUUID()}`;
|
||||
await core.group(`Creating temp docker context (TLS data loaded in default one)`, async () => {
|
||||
await Docker.getExecOutput(['context', 'create', tmpDockerContext], {
|
||||
ignoreReturnCode: true
|
||||
|
22
yarn.lock
22
yarn.lock
@ -62,6 +62,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/core@npm:^1.11.1":
|
||||
version: 1.11.1
|
||||
resolution: "@actions/core@npm:1.11.1"
|
||||
dependencies:
|
||||
"@actions/exec": ^1.1.1
|
||||
"@actions/http-client": ^2.0.1
|
||||
checksum: 9ac7a3e0b478bfefd862dcb4ddaa1d8c3f9076bb1931d3d280918d1749e7783480c6a009c1b009c8bf5093e2d77d9f4e023d70416145bf246f0071736d4ef839
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/exec@npm:^1.0.0, @actions/exec@npm:^1.0.1, @actions/exec@npm:^1.1.1":
|
||||
version: 1.1.1
|
||||
resolution: "@actions/exec@npm:1.1.1"
|
||||
@ -3177,7 +3187,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "docker-setup-buildx@workspace:."
|
||||
dependencies:
|
||||
"@actions/core": ^1.10.1
|
||||
"@actions/core": ^1.11.1
|
||||
"@docker/actions-toolkit": ^0.39.0
|
||||
"@types/js-yaml": ^4.0.9
|
||||
"@types/node": ^20.12.12
|
||||
@ -3195,7 +3205,6 @@ __metadata:
|
||||
ts-jest: ^29.1.2
|
||||
ts-node: ^10.9.2
|
||||
typescript: ^5.4.5
|
||||
uuid: ^10.0.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@ -6680,15 +6689,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^10.0.0":
|
||||
version: 10.0.0
|
||||
resolution: "uuid@npm:10.0.0"
|
||||
bin:
|
||||
uuid: dist/bin/uuid
|
||||
checksum: 4b81611ade2885d2313ddd8dc865d93d8dccc13ddf901745edca8f86d99bc46d7a330d678e7532e7ebf93ce616679fb19b2e3568873ac0c14c999032acb25869
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^3.3.2, uuid@npm:^3.3.3":
|
||||
version: 3.4.0
|
||||
resolution: "uuid@npm:3.4.0"
|
||||
|
Loading…
Reference in New Issue
Block a user