diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23e0d20..7946103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -119,8 +117,6 @@ jobs: - name: Set up Docker uses: ./ - with: - version: v23.0.1 - name: Start registry run: | @@ -153,8 +149,6 @@ jobs: - name: Set up Docker uses: ./ - with: - version: v23.0.1 - name: Build working-directory: ./test diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index 9f393ba..bc23768 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -37,6 +37,15 @@ describe('getInputs', () => { channel: 'test', context: 'foo', } as context.Inputs + ], + [ + 2, + new Map([]), + { + version: 'latest', + channel: '', + context: '', + } as context.Inputs ] ])( '[%d] given %p as inputs, returns %p', diff --git a/action.yml b/action.yml index a05ed73..5c258ee 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/src/context.ts b/src/context.ts index 717f379..b5f0260 100644 --- a/src/context.ts +++ b/src/context.ts @@ -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') }; diff --git a/src/main.ts b/src/main.ts index 27649c2..e6d3930 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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' });