Skip to content

Commit a2ce6b1

Browse files
authored
Merge pull request #8 from crazy-max/fix-version-latest
fix version to latest
2 parents e8785f7 + 5265cc1 commit a2ce6b1

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ jobs:
8989
-
9090
name: Set up Docker
9191
uses: ./
92-
with:
93-
version: v23.0.1
9492
-
9593
name: Set up Docker Buildx
9694
uses: docker/setup-buildx-action@v2
@@ -119,8 +117,6 @@ jobs:
119117
-
120118
name: Set up Docker
121119
uses: ./
122-
with:
123-
version: v23.0.1
124120
-
125121
name: Start registry
126122
run: |
@@ -153,8 +149,6 @@ jobs:
153149
-
154150
name: Set up Docker
155151
uses: ./
156-
with:
157-
version: v23.0.1
158152
-
159153
name: Build
160154
working-directory: ./test

__tests__/context.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ describe('getInputs', () => {
3737
channel: 'test',
3838
context: 'foo',
3939
} as context.Inputs
40+
],
41+
[
42+
2,
43+
new Map<string, string>([]),
44+
{
45+
version: 'latest',
46+
channel: '',
47+
context: '',
48+
} as context.Inputs
4049
]
4150
])(
4251
'[%d] given %p as inputs, returns %p',

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ inputs:
1010
version:
1111
description: 'Docker CE version. (e.g, v23.0.1)'
1212
required: false
13+
default: 'latest'
1314
channel:
1415
description: 'Docker CE channel. (e.g, stable, edge or test)'
1516
required: false

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface Inputs {
88

99
export function getInputs(): Inputs {
1010
return {
11-
version: core.getInput('version'),
11+
version: core.getInput('version') || 'latest',
1212
channel: core.getInput('channel'),
1313
context: core.getInput('context')
1414
};

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ actionsToolkit.run(
2121

2222
const install = new Install({
2323
runDir: runDir,
24-
version: input.version || 'latest',
24+
version: input.version,
2525
channel: input.channel || 'stable',
2626
contextName: input.context || 'setup-docker-action'
2727
});

0 commit comments

Comments
 (0)