Skip to content

Commit

Permalink
Merge pull request #8 from crazy-max/fix-version-latest
Browse files Browse the repository at this point in the history
fix version to latest
  • Loading branch information
crazy-max authored Mar 10, 2023
2 parents e8785f7 + 5265cc1 commit a2ce6b1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ jobs:
-
name: Set up Docker
uses: ./
with:
version: v23.0.1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -119,8 +117,6 @@ jobs:
-
name: Set up Docker
uses: ./
with:
version: v23.0.1
-
name: Start registry
run: |
Expand Down Expand Up @@ -153,8 +149,6 @@ jobs:
-
name: Set up Docker
uses: ./
with:
version: v23.0.1
-
name: Build
working-directory: ./test
Expand Down
9 changes: 9 additions & 0 deletions __tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ describe('getInputs', () => {
channel: 'test',
context: 'foo',
} as context.Inputs
],
[
2,
new Map<string, string>([]),
{
version: 'latest',
channel: '',
context: '',
} as context.Inputs
]
])(
'[%d] given %p as inputs, returns %p',
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ inputs:
version:
description: 'Docker CE version. (e.g, v23.0.1)'
required: false
default: 'latest'
channel:
description: 'Docker CE channel. (e.g, stable, edge or test)'
required: false
Expand Down
2 changes: 1 addition & 1 deletion 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 src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Inputs {

export function getInputs(): Inputs {
return {
version: core.getInput('version'),
version: core.getInput('version') || 'latest',
channel: core.getInput('channel'),
context: core.getInput('context')
};
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ actionsToolkit.run(

const install = new Install({
runDir: runDir,
version: input.version || 'latest',
version: input.version,
channel: input.channel || 'stable',
contextName: input.context || 'setup-docker-action'
});
Expand Down

0 comments on commit a2ce6b1

Please sign in to comment.