mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-23 03:16:09 +08:00
docker/install: Remove deprecated version and channel
Use InstallSource instead Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
b8a96071a8
commit
de390e0872
@ -55,7 +55,11 @@ aarch64:https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-g
|
||||
}
|
||||
await expect((async () => {
|
||||
const install = new Install({
|
||||
version: version,
|
||||
source: {
|
||||
type: 'archive',
|
||||
version: version,
|
||||
channel: 'stable',
|
||||
},
|
||||
runDir: tmpDir,
|
||||
contextName: 'foo',
|
||||
daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}`
|
||||
|
@ -40,7 +40,11 @@ describe('download', () => {
|
||||
'acquires %p of docker (%s)', async (version, platformOS) => {
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS as NodeJS.Platform);
|
||||
const install = new Install({
|
||||
version: version,
|
||||
source: {
|
||||
type: 'archive',
|
||||
version: version,
|
||||
channel: 'stable',
|
||||
},
|
||||
runDir: tmpDir,
|
||||
});
|
||||
const toolPath = await install.download();
|
||||
|
@ -51,13 +51,6 @@ export type InstallSource = InstallSourceImage | InstallSourceArchive;
|
||||
export interface InstallOpts {
|
||||
source?: InstallSource;
|
||||
|
||||
// @deprecated
|
||||
// Use `source = InstallSourceTypeArchive{version: ..., channel: ...}` instead
|
||||
version?: string;
|
||||
// @deprecated
|
||||
// Use `source = InstallSourceTypeArchive{version: ..., channel: ...}` instead
|
||||
channel?: string;
|
||||
|
||||
// ...
|
||||
runDir: string;
|
||||
contextName?: string;
|
||||
@ -84,8 +77,8 @@ export class Install {
|
||||
this.runDir = opts.runDir;
|
||||
this.source = opts.source || {
|
||||
type: 'archive',
|
||||
version: opts.version || 'latest',
|
||||
channel: opts.channel || 'stable'
|
||||
version: 'latest',
|
||||
channel: 'stable'
|
||||
};
|
||||
this.contextName = opts.contextName || 'setup-docker-action';
|
||||
this.daemonConfig = opts.daemonConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user