mirror of
https://github.com/docker/setup-docker-action.git
synced 2025-04-21 00:00:02 +02:00
commit
3dcc76c352
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -30,3 +30,23 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
version: v23.0.0
|
||||
|
||||
channel:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up Docker
|
||||
uses: ./
|
||||
with:
|
||||
version: v23.0.0-rc.4
|
||||
channel: test
|
||||
|
@ -42,8 +42,9 @@ jobs:
|
||||
Following inputs can be used as `step.with` keys
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|-----------|--------|----------|--------------------------------------|
|
||||
|-----------|--------|----------|---------------------------------------------------------------------------------------------------|
|
||||
| `version` | String | `latest` | Docker CE version (e.g., `v23.0.1`). |
|
||||
| `channel` | String | `stable` | Docker CE [channel](https://download.docker.com/linux/static/) (e.g, `stable`, `edge` or `test`). |
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -21,6 +21,18 @@ describe('getInputs', () => {
|
||||
]),
|
||||
{
|
||||
version: 'v23.0.1',
|
||||
channel: '',
|
||||
} as context.Inputs
|
||||
],
|
||||
[
|
||||
1,
|
||||
new Map<string, string>([
|
||||
['version', 'v23.0.0-rc.4'],
|
||||
['channel', 'test'],
|
||||
]),
|
||||
{
|
||||
version: 'v23.0.0-rc.4',
|
||||
channel: 'test',
|
||||
} as context.Inputs
|
||||
]
|
||||
])(
|
||||
|
@ -10,6 +10,9 @@ inputs:
|
||||
version:
|
||||
description: 'Docker CE version. (e.g, v23.0.1)'
|
||||
required: false
|
||||
channel:
|
||||
description: 'Docker CE channel. (e.g, stable, edge or test)'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'node16'
|
||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -2,10 +2,12 @@ import * as core from '@actions/core';
|
||||
|
||||
export interface Inputs {
|
||||
version: string;
|
||||
channel: string;
|
||||
}
|
||||
|
||||
export function getInputs(): Inputs {
|
||||
return {
|
||||
version: core.getInput('version')
|
||||
version: core.getInput('version'),
|
||||
channel: core.getInput('channel')
|
||||
};
|
||||
}
|
||||
|
@ -17,7 +17,8 @@ actionsToolkit.run(
|
||||
|
||||
const install = new Install({
|
||||
runDir: runDir,
|
||||
version: input.version
|
||||
version: input.version,
|
||||
channel: input.channel
|
||||
});
|
||||
let toolDir;
|
||||
if (!(await Docker.isAvailable()) || input.version) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user