Merge pull request #5 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.1.0-beta.18

Bump @docker/actions-toolkit from 0.1.0-beta.17 to 0.1.0-beta.18
This commit is contained in:
CrazyMax
2023-03-09 23:31:13 +00:00
committed by GitHub
9 changed files with 28 additions and 32 deletions

View File

@ -29,4 +29,4 @@ jobs:
name: Set up Docker name: Set up Docker
uses: ./ uses: ./
with: with:
version: 23.0.0 version: v23.0.0

View File

@ -33,8 +33,6 @@ jobs:
- -
name: Set up Docker name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v1 uses: crazy-max/ghaction-setup-docker@v1
with:
version: 23.0.1
``` ```
## Customizing ## Customizing
@ -43,9 +41,9 @@ jobs:
Following inputs can be used as `step.with` keys Following inputs can be used as `step.with` keys
| Name | Type | Description | | Name | Type | Default | Description |
|-----------|--------|-------------------------------------| |-----------|--------|----------|--------------------------------------|
| `version` | String | Docker CE version (e.g., `23.0.1`). | | `version` | String | `latest` | Docker CE version (e.g., `v23.0.1`). |
## Contributing ## Contributing

View File

@ -17,10 +17,10 @@ describe('getInputs', () => {
[ [
0, 0,
new Map<string, string>([ new Map<string, string>([
['version', '23.0.1'], ['version', 'v23.0.1'],
]), ]),
{ {
version: '23.0.1', version: 'v23.0.1',
} as context.Inputs } as context.Inputs
] ]
])( ])(

View File

@ -8,7 +8,7 @@ branding:
inputs: inputs:
version: version:
description: 'Docker CE version. (e.g, 23.0.1)' description: 'Docker CE version. (e.g, v23.0.1)'
required: false required: false
runs: runs:

6
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@docker/actions-toolkit": "^0.1.0-beta.17", "@docker/actions-toolkit": "^0.1.0-beta.18",
"uuid": "^9.0.0" "uuid": "^9.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -13,18 +13,21 @@ actionsToolkit.run(
// main // main
async () => { async () => {
const input: context.Inputs = context.getInputs(); const input: context.Inputs = context.getInputs();
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4()}`);
const install = new Install(); const install = new Install({
runDir: runDir,
version: input.version
});
let toolDir; let toolDir;
if (!(await Docker.isAvailable()) || input.version) { if (!(await Docker.isAvailable()) || input.version) {
await core.group(`Download docker`, async () => { await core.group(`Download docker`, async () => {
toolDir = await install.download(input.version || 'latest'); toolDir = await install.download();
}); });
} }
if (toolDir) { if (toolDir) {
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4()}`);
stateHelper.setRunDir(runDir); stateHelper.setRunDir(runDir);
await install.install(toolDir, runDir, input.version); await install.install();
} }
await core.group(`Docker info`, async () => { await core.group(`Docker info`, async () => {
@ -37,7 +40,9 @@ actionsToolkit.run(
if (stateHelper.runDir.length == 0) { if (stateHelper.runDir.length == 0) {
return; return;
} }
const install = new Install(); const install = new Install({
await install.tearDown(stateHelper.runDir); runDir: stateHelper.runDir
});
await install.tearDown();
} }
); );

View File

@ -352,10 +352,10 @@
dependencies: dependencies:
"@cspotcode/source-map-consumer" "0.8.0" "@cspotcode/source-map-consumer" "0.8.0"
"@docker/actions-toolkit@^0.1.0-beta.17": "@docker/actions-toolkit@^0.1.0-beta.18":
version "0.1.0-beta.17" version "0.1.0-beta.18"
resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.1.0-beta.17.tgz#71efff853f34aba59e89e13d05cf9eaf599af2a2" resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.1.0-beta.18.tgz#cf5c61059dba81d8e0f595a0bcc67b125ec25f09"
integrity sha512-oB3qda7bTDZ3hBJxZS4TO5IK9OvelAwQicLYrfi1Uw3ROTTjpSU4sttUupY499cviLlQ/9vcTdB+8ZR+pBi1ww== integrity sha512-WzayeV7ZNaqWyozWUI1QVZefacqWUV9gT/w54YiiizG145YJEMov6FXYMec2OE2tsTJ9uI1UgOl5hW/HFdG1mA==
dependencies: dependencies:
"@actions/core" "^1.10.0" "@actions/core" "^1.10.0"
"@actions/exec" "^1.1.1" "@actions/exec" "^1.1.1"
@ -3065,7 +3065,7 @@ saxes@^5.0.1:
dependencies: dependencies:
xmlchars "^2.2.0" xmlchars "^2.2.0"
semver@7.x, semver@^7.3.2, semver@^7.3.7, semver@^7.3.8: semver@7.x, semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8:
version "7.3.8" version "7.3.8"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
@ -3077,13 +3077,6 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.3.5:
version "7.3.5"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
dependencies:
lru-cache "^6.0.0"
shebang-command@^2.0.0: shebang-command@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"