Merge pull request #8 from crazy-max/fix-version-latest

fix version to latest
This commit is contained in:
CrazyMax 2023-03-10 10:15:15 +00:00 committed by GitHub
commit a2ce6b1772
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 10 deletions

View File

@ -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

View File

@ -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',

View File

@ -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

2
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

@ -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')
};

View File

@ -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'
});