Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kestra-io/validate-action
https://github.com/kestra-io/validate-action
github-actions kestra
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kestra-io/validate-action
- Owner: kestra-io
- Created: 2023-02-01T13:23:18.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T08:24:06.000Z (4 months ago)
- Last Synced: 2024-08-07T12:09:23.346Z (4 months ago)
- Topics: github-actions, kestra
- Language: Shell
- Size: 12.7 KB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Validate Action
Official GitHub Action to create CI/CD pipelines that validate [Flows](https://kestra.io/docs/workflow-components/flow) before deploying to your Kestra server.
This action could be used within a workflow that runs when a `Pull Request` is triggered.
The Action version is based on the Kestra Version. Only Kestra v0.6.1+ is supported.
## What does the action do ?
* Take a folder in input containing your `Flow` **or** `Template` as yaml files. The action look recursively meaning
resources in subfolder will be validated too.
* For each resource, 2 outputs are possible:
* '✔️ flow-id' when your resource is validated.
* '❌ filename' when an error was found in your resource. Following by the error message.## Usage
### Inputs
| Inputs | Required | Default | Description |
|---------------|--------------------|---------|----------------------------------------------------------------------------|
| ``directory`` | :heavy_check_mark: | | Folder containing your resources |
| ``resource`` | :heavy_check_mark: | | Resource you want to update in your namespace, can be `flow` or `template` |
| ``server`` | :x: | | URL of your Kestra server, if none is provided, validation is done locally |
| ``user`` | :x: | | User for the basic auth |
| ``password`` | :x: | | Password for the basic auth |
| ``apiToken`` | :x: | | API token for EE auth |
| ``tenant`` | :x: | | Tenant identifier (EE only, when multi-tenancy is enabled) |### Server-side validation
The validation can be done locally with the client, but if you have custom plugin or want your `Flows` to be validated
with TaskDefaults included, it may be more interesting to validate your resources on the server-side.#### Differences between server-side and client-side validation
| Validation | Server-side | Client-side |
|--------------------|--------------------|--------------------|
| Format | :heavy_check_mark: | :heavy_check_mark: |
| Plugins properties | :heavy_check_mark: | :x: |
| Customs plugin | :heavy_check_mark: | :x: |
| Flows PluginDefaults | :heavy_check_mark: | :x: |### Auth
Depending on your Kestra edition, you may need to include `user` and `password` to authenticate
on the server.### Example
Example with `Flows`, validated on the `server-side`.
```yaml
- name: Checkout repo content
uses: actions/checkout@v4- name: flow update namespace action
uses: kestra-io/validate-action@master
with:
resource: flow
directory: ./kestra/flows
server: https:/kestra.io
```Example with `Templates`, validated locally with the `Kestra Client`.
```yaml
- name: Checkout repo content
uses: actions/checkout@v4- name: template update namespace action
uses: kestra-io/validate-action@master
with:
resource: template
directory: ./kestra/templates
```Read more in the documentation [here](https://kestra.io/docs/version-control-cicd/cicd/github-action).