mirror of
https://github.com/werf/actions.git
synced 2026-02-14 15:26:26 +03:00
Compare commits
6 Commits
dependabot
...
fix/deploy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c6f60b137 | ||
|
|
6ad28e741a | ||
|
|
b3b83d531c | ||
|
|
f3a12bd69b | ||
|
|
af48145692 | ||
|
|
4cd91e1efe |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -96,4 +96,7 @@ Thumbs.db
|
||||
|
||||
# Ignore built ts files
|
||||
__tests__/runner/*
|
||||
lib/**/*
|
||||
lib/**/*
|
||||
|
||||
# Intellij
|
||||
/.idea
|
||||
36
README.md
36
README.md
@@ -5,7 +5,7 @@ ___
|
||||
|
||||
This action allows you to organize CI/CD with GitHub Actions and [werf](https://github.com/werf/werf).
|
||||
|
||||
**Ready-to-use GitHub Actions Workflows** for different CI/CD workflows are available [here](https://werf.io/guides/nodejs/400_ci_cd_workflow/040_github_actions.html).
|
||||
**Ready-to-use GitHub Actions Workflows** for different CI/CD workflows are available [here](https://werf.io/getting_started/?usage=ci&ci=githubActions&runnerType=hostRunner&os=linux&buildBackend=buildah&projectType=simplified&sharedCICD=no&repoType=application).
|
||||
|
||||
## How to use
|
||||
|
||||
@@ -106,6 +106,40 @@ converge:
|
||||
|
||||
In the simplest case, if an [integrated GitHub Packages-like container registry](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages) is used, then the authorization is performed automatically when the `werf ci-env` command is invoked. This command is run with several required arguments such as GitHub environment variables, the [`GITHUB_TOKEN` secret](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) (you have to explicitly declare it).
|
||||
|
||||
### Building multi-platform images
|
||||
|
||||
To build multi-platform images or customize the build environment, you can use [docker/setup-buildx-action@v3](https://github.com/docker/setup-buildx-action).
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Install werf
|
||||
uses: werf/actions/install@v2
|
||||
|
||||
- name: cr login
|
||||
run: werf cr login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_TOKEN }} registry.example.com
|
||||
|
||||
- name: converge
|
||||
run: |
|
||||
. $(werf ci-env github --as-file)
|
||||
werf converge
|
||||
env:
|
||||
WERF_KUBECONFIG_BASE64: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
|
||||
WERF_ENV: production
|
||||
```
|
||||
|
||||
> No additional configuration is required, and QEMU is automatically used for cross-platform builds.
|
||||
|
||||
## License
|
||||
|
||||
Apache License 2.0, see [LICENSE](LICENSE)
|
||||
|
||||
@@ -7,7 +7,7 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -10,7 +10,7 @@ The action combines all the necessary steps in itself and logic may be divided i
|
||||
```yaml
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -7,7 +7,7 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -10,7 +10,7 @@ The action combines all the necessary steps in itself and logic may be divided i
|
||||
```yaml
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -7,7 +7,7 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -10,7 +10,7 @@ The action combines all the necessary steps in itself and logic may be divided i
|
||||
```yaml
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -7,12 +7,12 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
required: false
|
||||
env: # TODO: Remove this deprecated werf option, which is not required anymore (use WERF_ENV variable instead)
|
||||
env: # DEPRECATED: Use WERF_ENV environment variable instead (e.g., env: { WERF_ENV: value })
|
||||
description: 'Specific deployment environment'
|
||||
required: false
|
||||
github-token:
|
||||
|
||||
1456
converge/index.js
1456
converge/index.js
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ The action combines all the necessary steps in itself and logic may be divided i
|
||||
```yaml
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -7,7 +7,7 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -27,7 +27,7 @@ Withal, it is not necessary to work within release channels, and the user might
|
||||
```yaml
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -7,7 +7,7 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -11,7 +11,7 @@ The action combines all the necessary steps in itself and logic may be divided i
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -7,7 +7,7 @@ branding:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'The one of the following channel: alpha, beta, ea, stable, rock-solid'
|
||||
default: 'alpha'
|
||||
default: 'stable'
|
||||
required: false
|
||||
version:
|
||||
description: 'The certain version'
|
||||
|
||||
@@ -3,7 +3,11 @@ import {PrepareEnvironAndRunWerfCommand} from './common'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
process.env.WERF_ENV = core.getInput('env')
|
||||
// with.env parameter has priority over WERF_ENV environment variable
|
||||
const envInput = core.getInput('env')
|
||||
if (envInput) {
|
||||
process.env.WERF_ENV = envInput
|
||||
}
|
||||
await PrepareEnvironAndRunWerfCommand(['converge'])
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
|
||||
Reference in New Issue
Block a user