Merge pull request #20 from werf/versioning_by_git_branches

Using git branches for versioning
This commit is contained in:
Alexey Igrychev
2021-03-10 11:47:52 +00:00
committed by GitHub
33 changed files with 270 additions and 201 deletions

View File

@@ -25,23 +25,22 @@ Each action combines all the necessary steps in itself and logic may be divided
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -53,7 +52,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/build-and-publish@master - uses: werf/actions/build-and-publish@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -71,7 +70,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/build-and-publish@master - uses: werf/actions/build-and-publish@v1.1
env: env:
WERF_LOG_VERBOSE: "on" WERF_LOG_VERBOSE: "on"
WERF_TAG_CUSTOM_TAG1: tag1 WERF_TAG_CUSTOM_TAG1: tag1
@@ -94,7 +93,7 @@ converge:
fetch-depth: 0 fetch-depth: 0
- name: Converge - name: Converge
uses: werf/actions/converge@master uses: werf/actions/converge@v1.1
with: with:
env: production env: production
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
@@ -114,7 +113,7 @@ build-and-publish:
fetch-depth: 0 fetch-depth: 0
- name: Build and Publish - name: Build and Publish
uses: werf/actions/build-and-publish@master uses: werf/actions/build-and-publish@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
@@ -130,7 +129,7 @@ deploy:
fetch-depth: 0 fetch-depth: 0
- name: Deploy - name: Deploy
uses: werf/actions/deploy@master uses: werf/actions/deploy@v1.1
with: with:
env: production env: production
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
@@ -148,7 +147,7 @@ dismiss:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Dismiss - name: Dismiss
uses: werf/actions/dismiss@master uses: werf/actions/dismiss@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
env: production env: production
@@ -168,7 +167,7 @@ run:
fetch-depth: 0 fetch-depth: 0
- name: Run - name: Run
uses: werf/actions/run@master uses: werf/actions/run@v1.1
with: with:
image: backend image: backend
args: rails server args: rails server
@@ -192,7 +191,7 @@ cleanup:
run: git fetch --prune --unshallow run: git fetch --prune --unshallow
- name: Cleanup - name: Cleanup
uses: werf/actions/cleanup@master uses: werf/actions/cleanup@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -206,10 +205,10 @@ werf:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@master uses: actions/checkout@v1.1
- name: Install werf CLI - name: Install werf CLI
uses: werf/actions/install@master uses: werf/actions/install@v1.1
# for deploy and distributed locks # for deploy and distributed locks
- name: Create kube config - name: Create kube config

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/build-and-publish@master - uses: werf/actions/build-and-publish@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/build-and-publish@master - uses: werf/actions/build-and-publish@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/build-and-publish@master - uses: werf/actions/build-and-publish@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/build-and-publish@master - uses: werf/actions/build-and-publish@v1.1
env: env:
WERF_LOG_VERBOSE: "on" WERF_LOG_VERBOSE: "on"
WERF_TAG_CUSTOM_TAG1: tag1 WERF_TAG_CUSTOM_TAG1: tag1
@@ -66,10 +65,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -100,7 +95,7 @@ build-and-publish:
fetch-depth: 0 fetch-depth: 0
- name: Build and Publish - name: Build and Publish
uses: werf/actions/build-and-publish@master uses: werf/actions/build-and-publish@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4167,7 +4167,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11504,6 +11516,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11556,11 +11569,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43791,11 +43807,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43877,7 +43893,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/build@master - uses: werf/actions/build@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/build@master - uses: werf/actions/build@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/build@master - uses: werf/actions/build@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/build@master - uses: werf/actions/build@v1.1
env: env:
WERF_LOG_VERBOSE: "on" WERF_LOG_VERBOSE: "on"
WERF_TAG_CUSTOM_TAG1: tag1 WERF_TAG_CUSTOM_TAG1: tag1
@@ -66,10 +65,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -100,7 +95,7 @@ build:
fetch-depth: 0 fetch-depth: 0
- name: Build - name: Build
uses: werf/actions/build@master uses: werf/actions/build@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4118,7 +4118,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43791,11 +43807,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43877,7 +43893,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/cleanup@master - uses: werf/actions/cleanup@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/cleanup@master - uses: werf/actions/cleanup@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/cleanup@master - uses: werf/actions/cleanup@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/cleanup@master - uses: werf/actions/cleanup@v1.1
env: env:
WERF_LOG_VERBOSE: "on" WERF_LOG_VERBOSE: "on"
``` ```
@@ -64,10 +63,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -99,7 +94,7 @@ cleanup:
run: git fetch --prune --unshallow run: git fetch --prune --unshallow
- name: Cleanup - name: Cleanup
uses: werf/actions/cleanup@master uses: werf/actions/cleanup@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4118,7 +4118,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43791,11 +43807,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43877,7 +43893,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
env: production env: production
env: env:
@@ -66,10 +65,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -103,7 +98,7 @@ converge:
fetch-depth: 0 fetch-depth: 0
- name: Converge - name: Converge
uses: werf/actions/converge@master uses: werf/actions/converge@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
env: production env: production

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4118,7 +4118,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43792,11 +43808,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43878,7 +43894,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/deploy@master - uses: werf/actions/deploy@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/deploy@master - uses: werf/actions/deploy@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/deploy@master - uses: werf/actions/deploy@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/deploy@master - uses: werf/actions/deploy@v1.1
with: with:
env: production env: production
env: env:
@@ -66,10 +65,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -103,7 +98,7 @@ deploy:
fetch-depth: 0 fetch-depth: 0
- name: Deploy - name: Deploy
uses: werf/actions/deploy@master uses: werf/actions/deploy@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
env: production env: production

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4118,7 +4118,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43756,11 +43772,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43842,7 +43858,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/converge@master - uses: werf/actions/converge@v1.1
with: with:
env: production env: production
env: env:
@@ -66,10 +65,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -101,7 +96,7 @@ dismiss:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Dismiss - name: Dismiss
uses: werf/actions/dismiss@master uses: werf/actions/dismiss@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
env: production env: production

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4118,7 +4118,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11505,6 +11517,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11557,11 +11570,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43792,11 +43808,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43878,7 +43894,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -4,32 +4,27 @@
___ ___
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/install@master - uses: werf/actions/install@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/install@master - uses: werf/actions/install@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -48,10 +43,10 @@ werf:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@master uses: actions/checkout@v1.1
- name: Install werf CLI - name: Install werf CLI
uses: werf/actions/install@master uses: werf/actions/install@v1.1
# for deploy and distributed locks # for deploy and distributed locks
- name: Create kube config - name: Create kube config

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -1880,6 +1880,20 @@ function _readLinuxVersionFile() {
exports._readLinuxVersionFile = _readLinuxVersionFile; exports._readLinuxVersionFile = _readLinuxVersionFile;
//# sourceMappingURL=manifest.js.map //# sourceMappingURL=manifest.js.map
/***/ }),
/***/ 290:
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }), /***/ }),
/***/ 293: /***/ 293:
@@ -17328,11 +17342,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(646)); const dotenv = __importStar(__webpack_require__(646));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -17414,7 +17428,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -1,6 +1,6 @@
{ {
"name": "werf-actions", "name": "werf-actions",
"version": "1.0.0", "version": "1.1.0",
"description": "", "description": "",
"main": "lib", "main": "lib",
"dependencies": { "dependencies": {

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/publish@master - uses: werf/actions/publish@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/publish@master - uses: werf/actions/publish@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/publish@master - uses: werf/actions/publish@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/publish@master - uses: werf/actions/publish@v1.1
env: env:
WERF_LOG_VERBOSE: "on" WERF_LOG_VERBOSE: "on"
WERF_TAG_CUSTOM_TAG1: tag1 WERF_TAG_CUSTOM_TAG1: tag1
@@ -66,10 +65,6 @@ Any werf option can be defined with environment variables:
## Inputs ## Inputs
```yaml ```yaml
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -100,7 +95,7 @@ publish:
fetch-depth: 0 fetch-depth: 0
- name: Publish - name: Publish
uses: werf/actions/publish@master uses: werf/actions/publish@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4118,7 +4118,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43791,11 +43807,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43877,7 +43893,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -10,23 +10,22 @@ The action combines all the necessary steps in itself and logic may be divided i
### werf binary setup ### werf binary setup
By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)). By default, all actions setup actual werf version for [1.1 alpha channel](https://werf.io/releases.html) (more details about channels, werf release cycle and compatibility promise [here](https://github.com/werf/werf#backward-compatibility-promise)).
Using `group` and `channel` inputs the user can switch the release channel. Using the `channel` input the user can switch the release channel.
> This is recommended approach to be up-to-date and to use actual werf version without changing configurations > This is recommended approach to be up-to-date and to use actual werf version without changing configurations
```yaml ```yaml
- uses: werf/actions/run@master - uses: werf/actions/run@v1.1
with: with:
group: 1.1
channel: alpha channel: alpha
``` ```
Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input. Withal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.
```yaml ```yaml
- uses: werf/actions/run@master - uses: werf/actions/run@v1.1
with: with:
version: v1.1.16 version: v1.1.23
``` ```
### kubeconfig setup (*optional*) ### kubeconfig setup (*optional*)
@@ -38,7 +37,7 @@ The _kubeconfig_ may be used for deployment, cleanup, distributed locks and cach
* Pass secret with `kube-config-base64-data` input: * Pass secret with `kube-config-base64-data` input:
```yaml ```yaml
- uses: werf/actions/run@master - uses: werf/actions/run@v1.1
with: with:
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
``` ```
@@ -56,7 +55,7 @@ By default, action will use the token provided to your workflow.
Any werf option can be defined with environment variables: Any werf option can be defined with environment variables:
```yaml ```yaml
- uses: werf/actions/run@master - uses: werf/actions/run@v1.1
env: env:
WERF_LOG_VERBOSE: "on" WERF_LOG_VERBOSE: "on"
WERF_TAG_CUSTOM_TAG1: tag1 WERF_TAG_CUSTOM_TAG1: tag1
@@ -67,10 +66,6 @@ Any werf option can be defined with environment variables:
```yaml ```yaml
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'
@@ -107,7 +102,7 @@ run:
fetch-depth: 0 fetch-depth: 0
- name: Run - name: Run
uses: werf/actions/run@master uses: werf/actions/run@v1.1
with: with:
image: backend image: backend
args: rails server args: rails server

View File

@@ -5,10 +5,6 @@ branding:
color: blue color: blue
icon: anchor icon: anchor
inputs: inputs:
group:
description: 'The MAJOR.MINOR version'
default: '1.1'
required: false
channel: channel:
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid' description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
default: 'alpha' default: 'alpha'

View File

@@ -4240,7 +4240,19 @@ module.exports = gt
/***/ }), /***/ }),
/* 290 */, /* 290 */
/***/ (function(__unusedmodule, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0;
exports.MAJOR_MINOR_GROUP = '1.1';
exports.MAJOR = 1;
exports.MINOR = 1;
/***/ }),
/* 291 */, /* 291 */,
/* 292 */, /* 292 */,
/* 293 */ /* 293 */
@@ -11577,6 +11589,7 @@ const semver = __importStar(__webpack_require__(232));
const github_1 = __webpack_require__(127); const github_1 = __webpack_require__(127);
const typescript_string_operations_1 = __webpack_require__(863); const typescript_string_operations_1 = __webpack_require__(863);
const manager_1 = __webpack_require__(965); const manager_1 = __webpack_require__(965);
const werf = __importStar(__webpack_require__(290));
const minimalWerfVersion = 'v1.1.17'; const minimalWerfVersion = 'v1.1.17';
function PrepareEnvironAndRunWerfCommand(args) { function PrepareEnvironAndRunWerfCommand(args) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
@@ -11629,11 +11642,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext;
function ValidateWerfVersion(version) { function ValidateWerfVersion(version) {
const ver = semver.coerce(version); const ver = semver.coerce(version);
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP));
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return; return;
} }
} }
throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion));
} }
exports.ValidateWerfVersion = ValidateWerfVersion; exports.ValidateWerfVersion = ValidateWerfVersion;
@@ -43864,11 +43880,11 @@ const typescript_string_operations_1 = __webpack_require__(863);
const crypto = __importStar(__webpack_require__(417)); const crypto = __importStar(__webpack_require__(417));
const tmp = __importStar(__webpack_require__(801)); const tmp = __importStar(__webpack_require__(801));
const dotenv = __importStar(__webpack_require__(972)); const dotenv = __importStar(__webpack_require__(972));
const werf = __importStar(__webpack_require__(290));
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
class Manager { class Manager {
constructor() { constructor() {
this.group = core.getInput('group').trim();
this.channel = core.getInput('channel').trim(); this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim(); this.version = core.getInput('version').trim();
if (process.platform.toString() === 'win32') { if (process.platform.toString() === 'win32') {
@@ -43950,7 +43966,7 @@ class Manager {
else { else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD;
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

View File

@@ -5,6 +5,7 @@ import * as semver from 'semver'
import {context} from '@actions/github' import {context} from '@actions/github'
import {String} from 'typescript-string-operations' import {String} from 'typescript-string-operations'
import {Manager} from './manager' import {Manager} from './manager'
import * as werf from './werf'
const minimalWerfVersion = 'v1.1.17' const minimalWerfVersion = 'v1.1.17'
@@ -66,6 +67,16 @@ export function ProcessGitHubContext(): void {
export function ValidateWerfVersion(version: string): void { export function ValidateWerfVersion(version: string): void {
const ver = semver.coerce(version) const ver = semver.coerce(version)
if (ver) { if (ver) {
if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) {
throw new Error(
String.Format(
'The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})',
version.trim(),
werf.MAJOR_MINOR_GROUP
)
)
}
if (semver.gte(ver, minimalWerfVersion)) { if (semver.gte(ver, minimalWerfVersion)) {
return return
} }
@@ -73,7 +84,7 @@ export function ValidateWerfVersion(version: string): void {
throw new Error( throw new Error(
String.Format( String.Format(
'werf version {0} is not supported (expected version should be equal or greater than {1})', 'werf version {0} is not supported (expected version must be equal or greater than {1})',
version.trim(), version.trim(),
minimalWerfVersion minimalWerfVersion
) )

View File

@@ -9,13 +9,13 @@ import {String} from 'typescript-string-operations'
import * as crypto from 'crypto' import * as crypto from 'crypto'
import * as tmp from 'tmp' import * as tmp from 'tmp'
import * as dotenv from 'dotenv' import * as dotenv from 'dotenv'
import * as werf from './werf'
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = const WERF_API_GET_CHANNEL_VERSION_URL_METHOD =
'https://werf.io/api/getChannelVersionURL' 'https://werf.io/api/getChannelVersionURL'
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL' const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'
export class Manager { export class Manager {
private readonly group: string
private readonly channel: string private readonly channel: string
private readonly version: string private readonly version: string
private readonly os: string private readonly os: string
@@ -24,7 +24,6 @@ export class Manager {
private binaryPath: string | undefined private binaryPath: string | undefined
constructor() { constructor() {
this.group = core.getInput('group').trim()
this.channel = core.getInput('channel').trim() this.channel = core.getInput('channel').trim()
this.version = core.getInput('version').trim() this.version = core.getInput('version').trim()
@@ -113,7 +112,7 @@ export class Manager {
} else { } else {
url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD
query = { query = {
group: this.group, group: werf.MAJOR_MINOR_GROUP,
channel: this.channel, channel: this.channel,
os: this.os, os: this.os,
arch: this.arch arch: this.arch

3
src/werf.ts Normal file
View File

@@ -0,0 +1,3 @@
export const MAJOR_MINOR_GROUP = '1.1'
export const MAJOR = 1
export const MINOR = 1