Compare commits
194 Commits
v1.0.1
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b60e4772d | ||
|
|
f4e83dcee9 | ||
|
|
33b4394f8b | ||
|
|
71337f89f6 | ||
|
|
3d137947f0 | ||
|
|
2e45dba80f | ||
|
|
e1d8c7b2f9 | ||
|
|
861c11a3c2 | ||
|
|
22fccf7992 | ||
|
|
fc991d89b7 | ||
|
|
bc2d734871 | ||
|
|
9f2648ff23 | ||
|
|
a57db4b385 | ||
|
|
7411b0c858 | ||
|
|
a517534609 | ||
|
|
3a95ca21ae | ||
|
|
2fee5be296 | ||
|
|
2bda52fb56 | ||
|
|
1f2bca914d | ||
|
|
fd00bb5e64 | ||
|
|
deff42fc66 | ||
|
|
74095b2568 | ||
|
|
a5ec0580af | ||
|
|
556c4f0251 | ||
|
|
0e70d636fa | ||
|
|
6b32e096b7 | ||
|
|
dca859b7b4 | ||
|
|
a417ad6d2c | ||
|
|
479ea78612 | ||
|
|
5a40f8624d | ||
|
|
7c8c232652 | ||
|
|
bafe70664b | ||
|
|
6d02fe3f21 | ||
|
|
dbfb85deef | ||
|
|
b64ed435da | ||
|
|
0314f91475 | ||
|
|
807792da62 | ||
|
|
6e9fad1298 | ||
|
|
e39b5ed1cf | ||
|
|
7067c1fdd4 | ||
|
|
0ba64429b6 | ||
|
|
db796c3668 | ||
|
|
dcef0a4fd5 | ||
|
|
752988e1b0 | ||
|
|
55d492b02c | ||
|
|
769d9fce90 | ||
|
|
0697ef82eb | ||
|
|
1b6f322e8b | ||
|
|
4d3c7d8eb1 | ||
|
|
4bc981775f | ||
|
|
e3123f9010 | ||
|
|
337ef92145 | ||
|
|
99c9d6f2ec | ||
|
|
956344aa1c | ||
|
|
2dc3a048d3 | ||
|
|
9bbb71a17d | ||
|
|
d53771606f | ||
|
|
92f5475537 | ||
|
|
0109124e7f | ||
|
|
0f0dbf454c | ||
|
|
cf12a5bd8f | ||
|
|
daa07b6638 | ||
|
|
82b719a261 | ||
|
|
abe8c25fa9 | ||
|
|
bc386705cd | ||
|
|
74002065a8 | ||
|
|
a57d255bcd | ||
|
|
d3ac04ec5a | ||
|
|
5b9d2b540c | ||
|
|
4a1344625a | ||
|
|
d138f75e1c | ||
|
|
3880331a4a | ||
|
|
37d27a91b8 | ||
|
|
651e8c78f4 | ||
|
|
4980b94c3c | ||
|
|
d5d09a170a | ||
|
|
698923e945 | ||
|
|
4e82703b99 | ||
|
|
acb8b4a664 | ||
|
|
5b2a2616b7 | ||
|
|
f956851d3c | ||
|
|
4be0b9d697 | ||
|
|
e0db97016d | ||
|
|
71a073de4f | ||
|
|
023656a262 | ||
|
|
8f67bcbfb7 | ||
|
|
907b5b5035 | ||
|
|
a316077f95 | ||
|
|
92f3cf265a | ||
|
|
628c4c2f99 | ||
|
|
a40ef1dc1f | ||
|
|
e378e3c5d0 | ||
|
|
6ac362a0ff | ||
|
|
5bc60d8436 | ||
|
|
005cadfc80 | ||
|
|
b9715bcc20 | ||
|
|
4d90bd64e9 | ||
|
|
d74e072dd9 | ||
|
|
b6d43b2113 | ||
|
|
a3d2050541 | ||
|
|
212b25fb56 | ||
|
|
45d86ed337 | ||
|
|
162a69a951 | ||
|
|
4be1b5c1a5 | ||
|
|
d8a06e4c53 | ||
|
|
ee806bbf3c | ||
|
|
6de49e6aac | ||
|
|
da46b584ff | ||
|
|
d49a607498 | ||
|
|
7d1dc154d6 | ||
|
|
5f83d391ab | ||
|
|
898059810c | ||
|
|
2472be1894 | ||
|
|
d97b415a3b | ||
|
|
4a12ad2f75 | ||
|
|
3e3089852d | ||
|
|
958700302a | ||
|
|
5ffac271ad | ||
|
|
9a49b0a930 | ||
|
|
f22da61f52 | ||
|
|
a60e667034 | ||
|
|
a82ab21555 | ||
|
|
40e2cd86ea | ||
|
|
30a8f98dcf | ||
|
|
b7e00b64d3 | ||
|
|
de923addba | ||
|
|
d73ed6d1fe | ||
|
|
2e5454b662 | ||
|
|
f0da1da249 | ||
|
|
0a323f5f06 | ||
|
|
0fac476af1 | ||
|
|
09c5c6c46f | ||
|
|
67e87ca32e | ||
|
|
eff5ebf5f8 | ||
|
|
d72814b162 | ||
|
|
a64db59d59 | ||
|
|
65b6702473 | ||
|
|
2e344892cd | ||
|
|
19f488f87e | ||
|
|
e3625da4c7 | ||
|
|
28cf5009be | ||
|
|
40d560ccde | ||
|
|
745e25b7f6 | ||
|
|
a078483210 | ||
|
|
f4e0a042f7 | ||
|
|
02635d928b | ||
|
|
a87d66d07e | ||
|
|
6b5a6c4373 | ||
|
|
d48e4ad0f6 | ||
|
|
a4e19fae06 | ||
|
|
5c1f7c551e | ||
|
|
cde9a1913a | ||
|
|
851300d465 | ||
|
|
39ba9c845f | ||
|
|
aa1e5622dd | ||
|
|
14d7a65708 | ||
|
|
93e94294df | ||
|
|
6e793d36ee | ||
|
|
f0cd0f993f | ||
|
|
cc1d3a4dbc | ||
|
|
a5f081bd53 | ||
|
|
32a88a3d14 | ||
|
|
10f13fc94d | ||
|
|
a7bc10bc0d | ||
|
|
53757c4d4e | ||
|
|
10115c380e | ||
|
|
9822365053 | ||
|
|
e1b6fb7a5d | ||
|
|
b162078db3 | ||
|
|
f7952001f5 | ||
|
|
a17c934fad | ||
|
|
8f88d958f5 | ||
|
|
5b199d021a | ||
|
|
54214a780d | ||
|
|
8c89fbd123 | ||
|
|
2b981e0eba | ||
|
|
436c132946 | ||
|
|
05dc7215e9 | ||
|
|
496a2134de | ||
|
|
d6c3a916ee | ||
|
|
ecd3566c81 | ||
|
|
f73439ca62 | ||
|
|
bf955761b2 | ||
|
|
98bf7786db | ||
|
|
42a7ee2bf3 | ||
|
|
3268a385e5 | ||
|
|
c0bf818478 | ||
|
|
61f4c9c927 | ||
|
|
7be9d34ace | ||
|
|
06c58cac8f | ||
|
|
15706adc71 | ||
|
|
0050aaf8ea | ||
|
|
4b20200534 | ||
|
|
c29f440249 |
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
@@ -10,17 +10,14 @@ jobs:
|
|||||||
build: # make sure build/ci work properly
|
build: # make sure build/ci work properly
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
# Make sure the release step uses its own credentials.
|
# Make sure the release step uses its own credentials.
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Read .nvmrc
|
- uses: actions/setup-node@v3
|
||||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
|
||||||
id: nvm
|
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
with:
|
||||||
cache: npm
|
cache: npm
|
||||||
node-version: ${{ steps.nvm.outputs.NVMRC }}
|
node-version-file: '.nvmrc'
|
||||||
- run: |
|
- run: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run all
|
npm run all
|
||||||
@@ -33,7 +30,13 @@ jobs:
|
|||||||
test: # make sure the action works on a clean machine without building
|
test: # make sure the action works on a clean machine without building
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
version: '1.26.2'
|
version: '1.26.2'
|
||||||
|
- uses: ./
|
||||||
|
with:
|
||||||
|
version: '2.4.1'
|
||||||
|
- uses: ./
|
||||||
|
with:
|
||||||
|
version: 'v2.4.1'
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2018 GitHub, Inc. and contributors
|
Copyright (c) 2021 Kengo TODA
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Add a step to your workflow like below:
|
|||||||
steps:
|
steps:
|
||||||
- uses: KengoTODA/actions-setup-docker-compose@main
|
- uses: KengoTODA/actions-setup-docker-compose@main
|
||||||
with:
|
with:
|
||||||
version: '1.26.2'
|
version: '1.29.2'
|
||||||
```
|
```
|
||||||
|
|
||||||
The `version` parameter is required, specify the full version of `docker-compose` command.
|
The `version` parameter is required, specify the full version of `docker-compose` command.
|
||||||
|
|||||||
@@ -1,7 +1,23 @@
|
|||||||
import {runCommand} from '../src/install'
|
import {install, runCommand} from '../src/install'
|
||||||
|
import * as core from '@actions/core'
|
||||||
|
|
||||||
import {expect, test} from '@jest/globals'
|
import {expect, test} from '@jest/globals'
|
||||||
|
|
||||||
test('runCommand', async () => {
|
test('runCommand', async () => {
|
||||||
const result = await runCommand('echo foo bar')
|
const result = await runCommand('echo foo bar')
|
||||||
expect(result).toBe('foo bar')
|
expect(result).toBe('foo bar')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
async function testVersion(version: string) {
|
||||||
|
const commandPath = await install(version)
|
||||||
|
core.addPath(commandPath)
|
||||||
|
const result = await runCommand('docker-compose version')
|
||||||
|
expect(result).toContain(version)
|
||||||
|
}
|
||||||
|
|
||||||
|
test('Install the right version', async () => {
|
||||||
|
await testVersion('1.29.1')
|
||||||
|
await testVersion('1.29.2')
|
||||||
|
await testVersion('2.2.3')
|
||||||
|
await testVersion('v2.2.3')
|
||||||
|
})
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ inputs:
|
|||||||
version:
|
version:
|
||||||
required: true
|
required: true
|
||||||
description: 'the version of docker-compose command'
|
description: 'the version of docker-compose command'
|
||||||
|
branding:
|
||||||
|
color: blue
|
||||||
|
icon: play
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
334
dist/index.js
vendored
334
dist/index.js
vendored
@@ -2,27 +2,17 @@ require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
|||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ 39:
|
/***/ 39:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.install = exports.runCommand = void 0;
|
exports.install = exports.runCommand = void 0;
|
||||||
const tool_cache_1 = __nccwpck_require__(784);
|
const tool_cache_1 = __nccwpck_require__(784);
|
||||||
const exec_1 = __nccwpck_require__(514);
|
const exec_1 = __nccwpck_require__(514);
|
||||||
function runCommand(command) {
|
async function runCommand(command) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let output = '';
|
let output = '';
|
||||||
const result = yield exec_1.exec(command, [], {
|
const result = await (0, exec_1.exec)(command, [], {
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data) => {
|
stdout: (data) => {
|
||||||
output += data.toString();
|
output += data.toString();
|
||||||
@@ -33,28 +23,27 @@ function runCommand(command) {
|
|||||||
throw new Error(`Failed to run command: ${command}`);
|
throw new Error(`Failed to run command: ${command}`);
|
||||||
}
|
}
|
||||||
return output.trim();
|
return output.trim();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
exports.runCommand = runCommand;
|
exports.runCommand = runCommand;
|
||||||
function installOnLinux(version) {
|
async function installOnLinux(version) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const system = runCommand('uname -s');
|
const system = runCommand('uname -s');
|
||||||
const hardware = runCommand('uname -m');
|
const hardware = runCommand('uname -m');
|
||||||
const url = `https://github.com/docker/compose/releases/download/${version}/docker-compose-${yield system}-${yield hardware}`;
|
if (!version.startsWith('v') && parseInt(version.split('.')[0], 10) >= 2) {
|
||||||
const installerPath = yield tool_cache_1.downloadTool(url);
|
version = `v${version}`;
|
||||||
yield exec_1.exec(`chmod +x ${installerPath}`);
|
|
||||||
return installerPath;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
function install(version) {
|
const url = `https://github.com/docker/compose/releases/download/${version}/docker-compose-${await system}-${await hardware}`;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
const installerPath = await (0, tool_cache_1.downloadTool)(url);
|
||||||
|
await (0, exec_1.exec)(`chmod +x ${installerPath}`);
|
||||||
|
const cachedPath = await (0, tool_cache_1.cacheFile)(installerPath, 'docker-compose', 'docker-compose', version);
|
||||||
|
return cachedPath;
|
||||||
|
}
|
||||||
|
async function install(version) {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return installOnLinux(version);
|
return installOnLinux(version);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported platform: ${process.platform}`);
|
throw new Error(`Unsupported platform: ${process.platform}`);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
exports.install = install;
|
exports.install = install;
|
||||||
|
|
||||||
@@ -68,7 +57,11 @@ exports.install = install;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||||
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||||
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||||
|
}
|
||||||
|
Object.defineProperty(o, k2, desc);
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -85,31 +78,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const core = __importStar(__nccwpck_require__(186));
|
const core = __importStar(__nccwpck_require__(186));
|
||||||
const install_1 = __nccwpck_require__(39);
|
const install_1 = __nccwpck_require__(39);
|
||||||
function run() {
|
async function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
try {
|
||||||
const version = core.getInput('version', {
|
const version = core.getInput('version', {
|
||||||
required: true
|
required: true
|
||||||
});
|
});
|
||||||
const commandPath = yield install_1.install(version);
|
const commandPath = await (0, install_1.install)(version);
|
||||||
core.addPath(commandPath);
|
core.addPath(commandPath);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error instanceof Error ? error.message : 'Unknown error');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
run();
|
run();
|
||||||
|
|
||||||
@@ -142,7 +124,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.issue = exports.issueCommand = void 0;
|
exports.issue = exports.issueCommand = void 0;
|
||||||
const os = __importStar(__nccwpck_require__(87));
|
const os = __importStar(__nccwpck_require__(37));
|
||||||
const utils_1 = __nccwpck_require__(278);
|
const utils_1 = __nccwpck_require__(278);
|
||||||
/**
|
/**
|
||||||
* Commands
|
* Commands
|
||||||
@@ -249,12 +231,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||||
const command_1 = __nccwpck_require__(351);
|
const command_1 = __nccwpck_require__(351);
|
||||||
const file_command_1 = __nccwpck_require__(717);
|
const file_command_1 = __nccwpck_require__(717);
|
||||||
const utils_1 = __nccwpck_require__(278);
|
const utils_1 = __nccwpck_require__(278);
|
||||||
const os = __importStar(__nccwpck_require__(87));
|
const os = __importStar(__nccwpck_require__(37));
|
||||||
const path = __importStar(__nccwpck_require__(622));
|
const path = __importStar(__nccwpck_require__(17));
|
||||||
|
const oidc_utils_1 = __nccwpck_require__(41);
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
*/
|
*/
|
||||||
@@ -523,6 +506,12 @@ function getState(name) {
|
|||||||
return process.env[`STATE_${name}`] || '';
|
return process.env[`STATE_${name}`] || '';
|
||||||
}
|
}
|
||||||
exports.getState = getState;
|
exports.getState = getState;
|
||||||
|
function getIDToken(aud) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return yield oidc_utils_1.OidcClient.getIDToken(aud);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.getIDToken = getIDToken;
|
||||||
//# sourceMappingURL=core.js.map
|
//# sourceMappingURL=core.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -556,8 +545,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.issueCommand = void 0;
|
exports.issueCommand = void 0;
|
||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
const fs = __importStar(__nccwpck_require__(747));
|
const fs = __importStar(__nccwpck_require__(147));
|
||||||
const os = __importStar(__nccwpck_require__(87));
|
const os = __importStar(__nccwpck_require__(37));
|
||||||
const utils_1 = __nccwpck_require__(278);
|
const utils_1 = __nccwpck_require__(278);
|
||||||
function issueCommand(command, message) {
|
function issueCommand(command, message) {
|
||||||
const filePath = process.env[`GITHUB_${command}`];
|
const filePath = process.env[`GITHUB_${command}`];
|
||||||
@@ -576,6 +565,90 @@ exports.issueCommand = issueCommand;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 41:
|
||||||
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.OidcClient = void 0;
|
||||||
|
const http_client_1 = __nccwpck_require__(925);
|
||||||
|
const auth_1 = __nccwpck_require__(702);
|
||||||
|
const core_1 = __nccwpck_require__(186);
|
||||||
|
class OidcClient {
|
||||||
|
static createHttpClient(allowRetry = true, maxRetry = 10) {
|
||||||
|
const requestOptions = {
|
||||||
|
allowRetries: allowRetry,
|
||||||
|
maxRetries: maxRetry
|
||||||
|
};
|
||||||
|
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
|
||||||
|
}
|
||||||
|
static getRequestToken() {
|
||||||
|
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
|
||||||
|
if (!token) {
|
||||||
|
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
|
||||||
|
}
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
static getIDTokenUrl() {
|
||||||
|
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
|
||||||
|
if (!runtimeUrl) {
|
||||||
|
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
|
||||||
|
}
|
||||||
|
return runtimeUrl;
|
||||||
|
}
|
||||||
|
static getCall(id_token_url) {
|
||||||
|
var _a;
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const httpclient = OidcClient.createHttpClient();
|
||||||
|
const res = yield httpclient
|
||||||
|
.getJson(id_token_url)
|
||||||
|
.catch(error => {
|
||||||
|
throw new Error(`Failed to get ID Token. \n
|
||||||
|
Error Code : ${error.statusCode}\n
|
||||||
|
Error Message: ${error.result.message}`);
|
||||||
|
});
|
||||||
|
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
|
||||||
|
if (!id_token) {
|
||||||
|
throw new Error('Response json body do not have ID Token field');
|
||||||
|
}
|
||||||
|
return id_token;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static getIDToken(audience) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
try {
|
||||||
|
// New ID Token is requested from action service
|
||||||
|
let id_token_url = OidcClient.getIDTokenUrl();
|
||||||
|
if (audience) {
|
||||||
|
const encodedAudience = encodeURIComponent(audience);
|
||||||
|
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
|
||||||
|
}
|
||||||
|
core_1.debug(`ID token url is ${id_token_url}`);
|
||||||
|
const id_token = yield OidcClient.getCall(id_token_url);
|
||||||
|
core_1.setSecret(id_token);
|
||||||
|
return id_token;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw new Error(`Error message: ${error.message}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.OidcClient = OidcClient;
|
||||||
|
//# sourceMappingURL=oidc-utils.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 278:
|
/***/ 278:
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
@@ -611,6 +684,7 @@ function toCommandProperties(annotationProperties) {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: annotationProperties.title,
|
title: annotationProperties.title,
|
||||||
|
file: annotationProperties.file,
|
||||||
line: annotationProperties.startLine,
|
line: annotationProperties.startLine,
|
||||||
endLine: annotationProperties.endLine,
|
endLine: annotationProperties.endLine,
|
||||||
col: annotationProperties.startColumn,
|
col: annotationProperties.startColumn,
|
||||||
@@ -657,7 +731,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getExecOutput = exports.exec = void 0;
|
exports.getExecOutput = exports.exec = void 0;
|
||||||
const string_decoder_1 = __nccwpck_require__(304);
|
const string_decoder_1 = __nccwpck_require__(576);
|
||||||
const tr = __importStar(__nccwpck_require__(159));
|
const tr = __importStar(__nccwpck_require__(159));
|
||||||
/**
|
/**
|
||||||
* Exec a command.
|
* Exec a command.
|
||||||
@@ -767,13 +841,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.argStringToArray = exports.ToolRunner = void 0;
|
exports.argStringToArray = exports.ToolRunner = void 0;
|
||||||
const os = __importStar(__nccwpck_require__(87));
|
const os = __importStar(__nccwpck_require__(37));
|
||||||
const events = __importStar(__nccwpck_require__(614));
|
const events = __importStar(__nccwpck_require__(361));
|
||||||
const child = __importStar(__nccwpck_require__(129));
|
const child = __importStar(__nccwpck_require__(81));
|
||||||
const path = __importStar(__nccwpck_require__(622));
|
const path = __importStar(__nccwpck_require__(17));
|
||||||
const io = __importStar(__nccwpck_require__(436));
|
const io = __importStar(__nccwpck_require__(436));
|
||||||
const ioUtil = __importStar(__nccwpck_require__(962));
|
const ioUtil = __importStar(__nccwpck_require__(962));
|
||||||
const timers_1 = __nccwpck_require__(213);
|
const timers_1 = __nccwpck_require__(512);
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
/*
|
/*
|
||||||
@@ -1355,6 +1429,72 @@ class ExecState extends events.EventEmitter {
|
|||||||
}
|
}
|
||||||
//# sourceMappingURL=toolrunner.js.map
|
//# sourceMappingURL=toolrunner.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 702:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
class BasicCredentialHandler {
|
||||||
|
constructor(username, password) {
|
||||||
|
this.username = username;
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
prepareRequest(options) {
|
||||||
|
options.headers['Authorization'] =
|
||||||
|
'Basic ' +
|
||||||
|
Buffer.from(this.username + ':' + this.password).toString('base64');
|
||||||
|
}
|
||||||
|
// This handler cannot handle 401
|
||||||
|
canHandleAuthentication(response) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleAuthentication(httpClient, requestInfo, objs) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.BasicCredentialHandler = BasicCredentialHandler;
|
||||||
|
class BearerCredentialHandler {
|
||||||
|
constructor(token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
// currently implements pre-authorization
|
||||||
|
// TODO: support preAuth = false where it hooks on 401
|
||||||
|
prepareRequest(options) {
|
||||||
|
options.headers['Authorization'] = 'Bearer ' + this.token;
|
||||||
|
}
|
||||||
|
// This handler cannot handle 401
|
||||||
|
canHandleAuthentication(response) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleAuthentication(httpClient, requestInfo, objs) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.BearerCredentialHandler = BearerCredentialHandler;
|
||||||
|
class PersonalAccessTokenCredentialHandler {
|
||||||
|
constructor(token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
// currently implements pre-authorization
|
||||||
|
// TODO: support preAuth = false where it hooks on 401
|
||||||
|
prepareRequest(options) {
|
||||||
|
options.headers['Authorization'] =
|
||||||
|
'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');
|
||||||
|
}
|
||||||
|
// This handler cannot handle 401
|
||||||
|
canHandleAuthentication(response) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleAuthentication(httpClient, requestInfo, objs) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 925:
|
/***/ 925:
|
||||||
@@ -1363,8 +1503,8 @@ class ExecState extends events.EventEmitter {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const http = __nccwpck_require__(605);
|
const http = __nccwpck_require__(685);
|
||||||
const https = __nccwpck_require__(211);
|
const https = __nccwpck_require__(687);
|
||||||
const pm = __nccwpck_require__(443);
|
const pm = __nccwpck_require__(443);
|
||||||
let tunnel;
|
let tunnel;
|
||||||
var HttpCodes;
|
var HttpCodes;
|
||||||
@@ -1983,9 +2123,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
var _a;
|
var _a;
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const assert_1 = __nccwpck_require__(357);
|
const assert_1 = __nccwpck_require__(491);
|
||||||
const fs = __nccwpck_require__(747);
|
const fs = __nccwpck_require__(147);
|
||||||
const path = __nccwpck_require__(622);
|
const path = __nccwpck_require__(17);
|
||||||
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
||||||
exports.IS_WINDOWS = process.platform === 'win32';
|
exports.IS_WINDOWS = process.platform === 'win32';
|
||||||
function exists(fsPath) {
|
function exists(fsPath) {
|
||||||
@@ -2184,9 +2324,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const childProcess = __nccwpck_require__(129);
|
const childProcess = __nccwpck_require__(81);
|
||||||
const path = __nccwpck_require__(622);
|
const path = __nccwpck_require__(17);
|
||||||
const util_1 = __nccwpck_require__(669);
|
const util_1 = __nccwpck_require__(837);
|
||||||
const ioUtil = __nccwpck_require__(962);
|
const ioUtil = __nccwpck_require__(962);
|
||||||
const exec = util_1.promisify(childProcess.exec);
|
const exec = util_1.promisify(childProcess.exec);
|
||||||
/**
|
/**
|
||||||
@@ -2505,9 +2645,9 @@ const semver = __importStar(__nccwpck_require__(911));
|
|||||||
const core_1 = __nccwpck_require__(186);
|
const core_1 = __nccwpck_require__(186);
|
||||||
// needs to be require for core node modules to be mocked
|
// needs to be require for core node modules to be mocked
|
||||||
/* eslint @typescript-eslint/no-require-imports: 0 */
|
/* eslint @typescript-eslint/no-require-imports: 0 */
|
||||||
const os = __nccwpck_require__(87);
|
const os = __nccwpck_require__(37);
|
||||||
const cp = __nccwpck_require__(129);
|
const cp = __nccwpck_require__(81);
|
||||||
const fs = __nccwpck_require__(747);
|
const fs = __nccwpck_require__(147);
|
||||||
function _findMatch(versionSpec, stable, candidates, archFilter) {
|
function _findMatch(versionSpec, stable, candidates, archFilter) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const platFilter = os.platform();
|
const platFilter = os.platform();
|
||||||
@@ -2731,17 +2871,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;
|
exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(186));
|
const core = __importStar(__nccwpck_require__(186));
|
||||||
const io = __importStar(__nccwpck_require__(940));
|
const io = __importStar(__nccwpck_require__(940));
|
||||||
const fs = __importStar(__nccwpck_require__(747));
|
const fs = __importStar(__nccwpck_require__(147));
|
||||||
const mm = __importStar(__nccwpck_require__(473));
|
const mm = __importStar(__nccwpck_require__(473));
|
||||||
const os = __importStar(__nccwpck_require__(87));
|
const os = __importStar(__nccwpck_require__(37));
|
||||||
const path = __importStar(__nccwpck_require__(622));
|
const path = __importStar(__nccwpck_require__(17));
|
||||||
const httpm = __importStar(__nccwpck_require__(925));
|
const httpm = __importStar(__nccwpck_require__(925));
|
||||||
const semver = __importStar(__nccwpck_require__(911));
|
const semver = __importStar(__nccwpck_require__(911));
|
||||||
const stream = __importStar(__nccwpck_require__(413));
|
const stream = __importStar(__nccwpck_require__(781));
|
||||||
const util = __importStar(__nccwpck_require__(669));
|
const util = __importStar(__nccwpck_require__(837));
|
||||||
const v4_1 = __importDefault(__nccwpck_require__(824));
|
const v4_1 = __importDefault(__nccwpck_require__(824));
|
||||||
const exec_1 = __nccwpck_require__(514);
|
const exec_1 = __nccwpck_require__(514);
|
||||||
const assert_1 = __nccwpck_require__(357);
|
const assert_1 = __nccwpck_require__(491);
|
||||||
const retry_helper_1 = __nccwpck_require__(279);
|
const retry_helper_1 = __nccwpck_require__(279);
|
||||||
class HTTPError extends Error {
|
class HTTPError extends Error {
|
||||||
constructor(httpStatusCode) {
|
constructor(httpStatusCode) {
|
||||||
@@ -3399,8 +3539,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
var _a;
|
var _a;
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
|
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
|
||||||
const fs = __importStar(__nccwpck_require__(747));
|
const fs = __importStar(__nccwpck_require__(147));
|
||||||
const path = __importStar(__nccwpck_require__(622));
|
const path = __importStar(__nccwpck_require__(17));
|
||||||
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
||||||
exports.IS_WINDOWS = process.platform === 'win32';
|
exports.IS_WINDOWS = process.platform === 'win32';
|
||||||
function exists(fsPath) {
|
function exists(fsPath) {
|
||||||
@@ -3582,10 +3722,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
|
exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
|
||||||
const assert_1 = __nccwpck_require__(357);
|
const assert_1 = __nccwpck_require__(491);
|
||||||
const childProcess = __importStar(__nccwpck_require__(129));
|
const childProcess = __importStar(__nccwpck_require__(81));
|
||||||
const path = __importStar(__nccwpck_require__(622));
|
const path = __importStar(__nccwpck_require__(17));
|
||||||
const util_1 = __nccwpck_require__(669);
|
const util_1 = __nccwpck_require__(837);
|
||||||
const ioUtil = __importStar(__nccwpck_require__(71));
|
const ioUtil = __importStar(__nccwpck_require__(71));
|
||||||
const exec = util_1.promisify(childProcess.exec);
|
const exec = util_1.promisify(childProcess.exec);
|
||||||
const execFile = util_1.promisify(childProcess.execFile);
|
const execFile = util_1.promisify(childProcess.execFile);
|
||||||
@@ -5512,13 +5652,13 @@ module.exports = __nccwpck_require__(219);
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
var net = __nccwpck_require__(631);
|
var net = __nccwpck_require__(808);
|
||||||
var tls = __nccwpck_require__(16);
|
var tls = __nccwpck_require__(404);
|
||||||
var http = __nccwpck_require__(605);
|
var http = __nccwpck_require__(685);
|
||||||
var https = __nccwpck_require__(211);
|
var https = __nccwpck_require__(687);
|
||||||
var events = __nccwpck_require__(614);
|
var events = __nccwpck_require__(361);
|
||||||
var assert = __nccwpck_require__(357);
|
var assert = __nccwpck_require__(491);
|
||||||
var util = __nccwpck_require__(669);
|
var util = __nccwpck_require__(837);
|
||||||
|
|
||||||
|
|
||||||
exports.httpOverHttp = httpOverHttp;
|
exports.httpOverHttp = httpOverHttp;
|
||||||
@@ -5817,7 +5957,7 @@ module.exports = bytesToUuid;
|
|||||||
// Unique ID creation requires a high quality random # generator. In node.js
|
// Unique ID creation requires a high quality random # generator. In node.js
|
||||||
// this is pretty straight-forward - we use the crypto API.
|
// this is pretty straight-forward - we use the crypto API.
|
||||||
|
|
||||||
var crypto = __nccwpck_require__(417);
|
var crypto = __nccwpck_require__(113);
|
||||||
|
|
||||||
module.exports = function nodeRNG() {
|
module.exports = function nodeRNG() {
|
||||||
return crypto.randomBytes(16);
|
return crypto.randomBytes(16);
|
||||||
@@ -5862,7 +6002,7 @@ module.exports = v4;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 357:
|
/***/ 491:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5870,7 +6010,7 @@ module.exports = require("assert");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 129:
|
/***/ 81:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5878,7 +6018,7 @@ module.exports = require("child_process");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 417:
|
/***/ 113:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5886,7 +6026,7 @@ module.exports = require("crypto");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 614:
|
/***/ 361:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5894,7 +6034,7 @@ module.exports = require("events");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 747:
|
/***/ 147:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5902,7 +6042,7 @@ module.exports = require("fs");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 605:
|
/***/ 685:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5910,7 +6050,7 @@ module.exports = require("http");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 211:
|
/***/ 687:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5918,7 +6058,7 @@ module.exports = require("https");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 631:
|
/***/ 808:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5926,7 +6066,7 @@ module.exports = require("net");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 87:
|
/***/ 37:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5934,7 +6074,7 @@ module.exports = require("os");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 622:
|
/***/ 17:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5942,7 +6082,7 @@ module.exports = require("path");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 413:
|
/***/ 781:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5950,7 +6090,7 @@ module.exports = require("stream");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 304:
|
/***/ 576:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5958,7 +6098,7 @@ module.exports = require("string_decoder");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 213:
|
/***/ 512:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5966,7 +6106,7 @@ module.exports = require("timers");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 16:
|
/***/ 404:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -5974,7 +6114,7 @@ module.exports = require("tls");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 669:
|
/***/ 837:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/sourcemap-register.js
vendored
2
dist/sourcemap-register.js
vendored
File diff suppressed because one or more lines are too long
15098
package-lock.json
generated
15098
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kengotoda/actions-setup-docker-compose",
|
"name": "@kengotoda/actions-setup-docker-compose",
|
||||||
"version": "1.0.1",
|
"version": "1.0.7",
|
||||||
"description": "the GitHub Action setting up docker-compose command",
|
"description": "the GitHub Action setting up docker-compose command",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"private": false,
|
"private": false,
|
||||||
@@ -33,18 +33,18 @@
|
|||||||
"@actions/tool-cache": "^1.7.1"
|
"@actions/tool-cache": "^1.7.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@semantic-release/exec": "^5.0.0",
|
"@semantic-release/exec": "^6.0.3",
|
||||||
"@semantic-release/git": "^9.0.0",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"@types/node": "^16.3.2",
|
"@types/node": "^17.0.0",
|
||||||
"@typescript-eslint/parser": "^4.28.3",
|
"@typescript-eslint/parser": "^5.3.0",
|
||||||
"@vercel/ncc": "^0.29.0",
|
"@vercel/ncc": "^0.33.0",
|
||||||
"eslint": "^7.30.0",
|
"eslint": "^8.1.0",
|
||||||
"eslint-plugin-github": "^4.1.3",
|
"eslint-plugin-github": "^4.3.3",
|
||||||
"eslint-plugin-jest": "^24.3.6",
|
"eslint-plugin-jest": "^26.0.0",
|
||||||
"jest": "^27.0.6",
|
"jest": "^27.0.6",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"prettier": "2.3.2",
|
"prettier": "2.6.2",
|
||||||
"semantic-release": "^17.4.4",
|
"semantic-release": "^19.0.2",
|
||||||
"ts-jest": "^27.0.3",
|
"ts-jest": "^27.0.3",
|
||||||
"typescript": "^4.3.5"
|
"typescript": "^4.3.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {downloadTool} from '@actions/tool-cache'
|
import {cacheFile, downloadTool} from '@actions/tool-cache'
|
||||||
import {exec} from '@actions/exec'
|
import {exec} from '@actions/exec'
|
||||||
|
|
||||||
export async function runCommand(command: string): Promise<string> {
|
export async function runCommand(command: string): Promise<string> {
|
||||||
@@ -19,10 +19,19 @@ export async function runCommand(command: string): Promise<string> {
|
|||||||
async function installOnLinux(version: string): Promise<string> {
|
async function installOnLinux(version: string): Promise<string> {
|
||||||
const system = runCommand('uname -s')
|
const system = runCommand('uname -s')
|
||||||
const hardware = runCommand('uname -m')
|
const hardware = runCommand('uname -m')
|
||||||
|
if (!version.startsWith('v') && parseInt(version.split('.')[0], 10) >= 2) {
|
||||||
|
version = `v${version}`
|
||||||
|
}
|
||||||
const url = `https://github.com/docker/compose/releases/download/${version}/docker-compose-${await system}-${await hardware}`
|
const url = `https://github.com/docker/compose/releases/download/${version}/docker-compose-${await system}-${await hardware}`
|
||||||
const installerPath = await downloadTool(url)
|
const installerPath = await downloadTool(url)
|
||||||
await exec(`chmod +x ${installerPath}`)
|
await exec(`chmod +x ${installerPath}`)
|
||||||
return installerPath
|
const cachedPath = await cacheFile(
|
||||||
|
installerPath,
|
||||||
|
'docker-compose',
|
||||||
|
'docker-compose',
|
||||||
|
version
|
||||||
|
)
|
||||||
|
return cachedPath
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function install(version: string): Promise<string> {
|
export async function install(version: string): Promise<string> {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ async function run(): Promise<void> {
|
|||||||
const commandPath = await install(version)
|
const commandPath = await install(version)
|
||||||
core.addPath(commandPath)
|
core.addPath(commandPath)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message)
|
core.setFailed(error instanceof Error ? error.message : 'Unknown error')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
"lib": ["DOM", "ES2021"],
|
||||||
|
"target": "ES2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
"outDir": "./lib", /* Redirect output structure to the directory. */
|
"outDir": "./lib", /* Redirect output structure to the directory. */
|
||||||
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
|
|||||||
Reference in New Issue
Block a user