mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-01 21:19:44 +11:00
rename dagger to dagger-cue (#79)
* rename dagger to dagger-cue fixes #78 Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
parent
75549c92b9
commit
2572459a33
8 changed files with 22 additions and 29 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -19,8 +19,8 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- 0.2
|
- latest
|
||||||
- 0.2.5
|
- 0.2.232
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
@ -56,8 +56,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- 0.2
|
- 0.2.232
|
||||||
- 0.2.5
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
@ -71,7 +70,7 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Check
|
name: Check
|
||||||
run: |
|
run: |
|
||||||
dagger version
|
dagger-cue version
|
||||||
|
|
||||||
build-ref:
|
build-ref:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -79,8 +78,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
ref:
|
ref:
|
||||||
- refs/tags/v0.2.5
|
- refs/heads/cue-sdk
|
||||||
- refs/pull/2288/head
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ Following inputs can be used as `step.with` keys
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
|----------------|--------|---------|----------------------------------------------------------------------------------------|
|
|----------------|--------|---------|----------------------------------------------------------------------------------------|
|
||||||
| `version` | String | `0.2` | Dagger version (e.g., `0.2.36`, `latest`, `https://github.com/dagger/dagger.git#main`) |
|
| `version` | String | `0.2.232` | Dagger version (e.g., `0.2.232`, `latest`, `https://github.com/dagger/dagger.git#main`) |
|
||||||
| `cmds` | List | | List of Dagger commands |
|
| `cmds` | List | | List of Dagger commands |
|
||||||
| `workdir` | String | `.` | Working directory (below repository root) |
|
| `workdir` | String | `.` | Working directory (below repository root) |
|
||||||
| `install-only` | Bool | `false` | Just install Dagger |
|
| `install-only` | Bool | `false` | Just install Dagger |
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,13 @@ describe('build', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('install', () => {
|
describe('install', () => {
|
||||||
it('acquires latest version of Dagger', async () => {
|
it('acquires latest version of dagger-cue', async () => {
|
||||||
const daggerBin = await dagger.install('latest');
|
const daggerBin = await dagger.install('latest');
|
||||||
expect(fs.existsSync(daggerBin)).toBe(true);
|
expect(fs.existsSync(daggerBin)).toBe(true);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
it('acquires latest 0.1 version', async () => {
|
it('acquires latest 0.2.232 version', async () => {
|
||||||
const daggerBin = await dagger.install('0.1');
|
const daggerBin = await dagger.install('0.2.232');
|
||||||
expect(fs.existsSync(daggerBin)).toBe(true);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it('acquires 0.1.0-alpha.9 version of Dagger', async () => {
|
|
||||||
const daggerBin = await dagger.install('0.1.0-alpha.9');
|
|
||||||
expect(fs.existsSync(daggerBin)).toBe(true);
|
expect(fs.existsSync(daggerBin)).toBe(true);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ branding:
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: 'Dagger version'
|
description: 'Dagger CUE version'
|
||||||
default: '0.2'
|
default: '0.2.232'
|
||||||
required: false
|
required: false
|
||||||
args:
|
args:
|
||||||
description: 'Arguments to pass to Dagger'
|
description: 'Arguments to pass to Dagger'
|
||||||
|
|
|
||||||
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
|
|
@ -23,7 +23,7 @@ export interface Inputs {
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
return {
|
return {
|
||||||
version: core.getInput('version') || '0.2',
|
version: core.getInput('version') || '0.2.232',
|
||||||
workdir: core.getInput('workdir') || '.',
|
workdir: core.getInput('workdir') || '.',
|
||||||
args: core.getInput('args'),
|
args: core.getInput('args'),
|
||||||
installOnly: core.getBooleanInput('install-only'),
|
installOnly: core.getBooleanInput('install-only'),
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import * as exec from '@actions/exec';
|
||||||
import * as http from '@actions/http-client';
|
import * as http from '@actions/http-client';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
|
|
||||||
const s3URL = 'https://dl.dagger.io/dagger';
|
const s3URL = 'https://dl.dagger.io/dagger-cue';
|
||||||
const osPlat: string = os.platform();
|
const osPlat: string = os.platform();
|
||||||
const osArch: string = os.arch();
|
const osArch: string = os.arch();
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ export async function build(inputBuildRef: string): Promise<string> {
|
||||||
core.debug(`Remote ref ${sha} found`);
|
core.debug(`Remote ref ${sha} found`);
|
||||||
|
|
||||||
let toolPath: string;
|
let toolPath: string;
|
||||||
toolPath = tc.find('dagger', sha);
|
toolPath = tc.find('dagger-cue', sha);
|
||||||
if (!toolPath) {
|
if (!toolPath) {
|
||||||
const outFolder = path.join(context.tmpDir(), 'out').split(path.sep).join(path.posix.sep);
|
const outFolder = path.join(context.tmpDir(), 'out').split(path.sep).join(path.posix.sep);
|
||||||
toolPath = await exec
|
toolPath = await exec
|
||||||
|
|
@ -34,11 +34,11 @@ export async function build(inputBuildRef: string): Promise<string> {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
core.warning(res.stderr.trim());
|
core.warning(res.stderr.trim());
|
||||||
}
|
}
|
||||||
return tc.cacheFile(`${outFolder}/bin/dagger`, osPlat == 'win32' ? 'dagger.exe' : 'dagger', 'dagger', sha);
|
return tc.cacheFile(`${outFolder}/bin/dagger-cue`, osPlat == 'win32' ? 'dagger-cue.exe' : 'dagger-cue', 'dagger-cue', sha);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return path.join(toolPath, osPlat == 'win32' ? 'dagger.exe' : 'dagger');
|
return path.join(toolPath, osPlat == 'win32' ? 'dagger-cue.exe' : 'dagger-cue');
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function install(version: string): Promise<string> {
|
export async function install(version: string): Promise<string> {
|
||||||
|
|
@ -59,13 +59,13 @@ export async function install(version: string): Promise<string> {
|
||||||
}
|
}
|
||||||
core.debug(`Extracted to ${extPath}`);
|
core.debug(`Extracted to ${extPath}`);
|
||||||
|
|
||||||
const cachePath: string = await tc.cacheDir(extPath, 'dagger', version);
|
const cachePath: string = await tc.cacheDir(extPath, 'dagger-cue', version);
|
||||||
core.debug(`Cached to ${cachePath}`);
|
core.debug(`Cached to ${cachePath}`);
|
||||||
|
|
||||||
const exePath: string = path.join(cachePath, osPlat == 'win32' ? 'dagger.exe' : 'dagger');
|
const exePath: string = path.join(cachePath, osPlat == 'win32' ? 'dagger-cue.exe' : 'dagger-cue');
|
||||||
core.debug(`Exe path is ${exePath}`);
|
core.debug(`Exe path is ${exePath}`);
|
||||||
|
|
||||||
return path.join(cachePath, osPlat == 'win32' ? 'dagger.exe' : 'dagger');
|
return path.join(cachePath, osPlat == 'win32' ? 'dagger-cue.exe' : 'dagger-cue');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getVersionMapping(version: string): Promise<string> {
|
async function getVersionMapping(version: string): Promise<string> {
|
||||||
|
|
@ -84,5 +84,5 @@ const getFilename = (version: string): string => {
|
||||||
const platform: string = osPlat == 'win32' ? 'windows' : osPlat;
|
const platform: string = osPlat == 'win32' ? 'windows' : osPlat;
|
||||||
const arch: string = osArch == 'x64' ? 'amd64' : osArch;
|
const arch: string = osArch == 'x64' ? 'amd64' : osArch;
|
||||||
const ext: string = osPlat == 'win32' ? '.zip' : '.tar.gz';
|
const ext: string = osPlat == 'win32' ? '.zip' : '.tar.gz';
|
||||||
return util.format('dagger_v%s_%s_%s%s', version, platform, arch, ext);
|
return util.format('dagger-cue_v%s_%s_%s%s', version, platform, arch, ext);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue