mirror of
https://github.com/docker/setup-docker-action.git
synced 2025-04-20 07:40:02 +02:00
commit
3dcc76c352
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -30,3 +30,23 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: v23.0.0
|
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
|
Following inputs can be used as `step.with` keys
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
|-----------|--------|----------|--------------------------------------|
|
|-----------|--------|----------|---------------------------------------------------------------------------------------------------|
|
||||||
| `version` | String | `latest` | Docker CE version (e.g., `v23.0.1`). |
|
| `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
|
## Contributing
|
||||||
|
|
||||||
|
@ -21,6 +21,18 @@ describe('getInputs', () => {
|
|||||||
]),
|
]),
|
||||||
{
|
{
|
||||||
version: 'v23.0.1',
|
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
|
} as context.Inputs
|
||||||
]
|
]
|
||||||
])(
|
])(
|
||||||
|
@ -10,6 +10,9 @@ inputs:
|
|||||||
version:
|
version:
|
||||||
description: 'Docker CE version. (e.g, v23.0.1)'
|
description: 'Docker CE version. (e.g, v23.0.1)'
|
||||||
required: false
|
required: false
|
||||||
|
channel:
|
||||||
|
description: 'Docker CE channel. (e.g, stable, edge or test)'
|
||||||
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
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 {
|
export interface Inputs {
|
||||||
version: string;
|
version: string;
|
||||||
|
channel: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getInputs(): Inputs {
|
export function getInputs(): Inputs {
|
||||||
return {
|
return {
|
||||||
version: core.getInput('version')
|
version: core.getInput('version'),
|
||||||
|
channel: core.getInput('channel')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,8 @@ actionsToolkit.run(
|
|||||||
|
|
||||||
const install = new Install({
|
const install = new Install({
|
||||||
runDir: runDir,
|
runDir: runDir,
|
||||||
version: input.version
|
version: input.version,
|
||||||
|
channel: input.channel
|
||||||
});
|
});
|
||||||
let toolDir;
|
let toolDir;
|
||||||
if (!(await Docker.isAvailable()) || input.version) {
|
if (!(await Docker.isAvailable()) || input.version) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user