Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @docker/actions-toolkit from 0.1.0-beta.17 to 0.1.0-beta.18 #5

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
name: Set up Docker
uses: ./
with:
version: 23.0.0
version: v23.0.0
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v1
with:
version: 23.0.1
```

## Customizing
Expand All @@ -43,9 +41,9 @@ jobs:

Following inputs can be used as `step.with` keys

| Name | Type | Description |
|-----------|--------|-------------------------------------|
| `version` | String | Docker CE version (e.g., `23.0.1`). |
| Name | Type | Default | Description |
|-----------|--------|----------|--------------------------------------|
| `version` | String | `latest` | Docker CE version (e.g., `v23.0.1`). |

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions __tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ describe('getInputs', () => {
[
0,
new Map<string, string>([
['version', '23.0.1'],
['version', 'v23.0.1'],
]),
{
version: '23.0.1',
version: 'v23.0.1',
} as context.Inputs
]
])(
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branding:

inputs:
version:
description: 'Docker CE version. (e.g, 23.0.1)'
description: 'Docker CE version. (e.g, v23.0.1)'
required: false

runs:
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"license": "Apache-2.0",
"dependencies": {
"@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"
},
"devDependencies": {
Expand Down
17 changes: 11 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ actionsToolkit.run(
// main
async () => {
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;
if (!(await Docker.isAvailable()) || input.version) {
await core.group(`Download docker`, async () => {
toolDir = await install.download(input.version || 'latest');
toolDir = await install.download();
});
}
if (toolDir) {
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4()}`);
stateHelper.setRunDir(runDir);
await install.install(toolDir, runDir, input.version);
await install.install();
}

await core.group(`Docker info`, async () => {
Expand All @@ -37,7 +40,9 @@ actionsToolkit.run(
if (stateHelper.runDir.length == 0) {
return;
}
const install = new Install();
await install.tearDown(stateHelper.runDir);
const install = new Install({
runDir: stateHelper.runDir
});
await install.tearDown();
}
);
17 changes: 5 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"

"@docker/actions-toolkit@^0.1.0-beta.17":
version "0.1.0-beta.17"
resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.1.0-beta.17.tgz#71efff853f34aba59e89e13d05cf9eaf599af2a2"
integrity sha512-oB3qda7bTDZ3hBJxZS4TO5IK9OvelAwQicLYrfi1Uw3ROTTjpSU4sttUupY499cviLlQ/9vcTdB+8ZR+pBi1ww==
"@docker/actions-toolkit@^0.1.0-beta.18":
version "0.1.0-beta.18"
resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.1.0-beta.18.tgz#cf5c61059dba81d8e0f595a0bcc67b125ec25f09"
integrity sha512-WzayeV7ZNaqWyozWUI1QVZefacqWUV9gT/w54YiiizG145YJEMov6FXYMec2OE2tsTJ9uI1UgOl5hW/HFdG1mA==
dependencies:
"@actions/core" "^1.10.0"
"@actions/exec" "^1.1.1"
Expand Down Expand Up @@ -3065,7 +3065,7 @@ saxes@^5.0.1:
dependencies:
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"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
Expand All @@ -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"
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:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
Expand Down