Skip to content

Commit

Permalink
feat: rm validate action in lieu of setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Jan 3, 2024
1 parent fcaf90d commit b21458f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Binary file added images/tooling/setup-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/tooling/validate-action.png
Binary file not shown.
31 changes: 19 additions & 12 deletions tooling/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,36 @@ title: GitHub Actions
description: How to use our GitHub Actions to automate your workflows.
---

## Validate
## Setup Flipt

![Flipt Validate Action](/images/tooling/validate-action.png)
![Flipt Setup Action](/images/tooling/setup-action.png)

The [flipt-validate action](https://github.com/flipt-io/validate-action) is used to validate your [features.yml](/configuration/storage#flag-state-configuration) files in a GitHub workflow. We recommend using this action in your workflow to ensure that your Flipt data is syntactically and semantically valid before deploying when using [Git](https://www.flipt.io/docs/configuration/storage#git) or other [declarative backends](https://www.flipt.io/docs/configuration/storage#declarative).

It uses the [`flipt validate`](/cli/commands/validate) command under the hood to validate your data. If the data is invalid, the action will fail and provide a detailed error annotation at the source of the error.
The [flipt-setup-action](https://github.com/marketplace/actions/flipt-setup-action) can be used to setup Flipt in your GitHub workflow. Once setup, you can then use any of the [CLI commands](https://www.flipt.io/docs/cli/overview) that Flipt provides in your workflow.

### Usage

The following example demonstrates how to use the action in a GitHub workflow.
The following example demonstrates how to use the action in a GitHub workflow which runs the [flipt validate](https://www.flipt.io/docs/cli/commands/validate) command.

```yaml
validate:
runs-on: ubuntu-latest
steps:
# Checkout the target repository
- uses: actions/checkout@v3

- uses: flipt-io/validate-action@v0.2.0
- uses: flipt-io/setup-action@v0.1.0
# with:
# Optional, the token to use for GitHub API requests
# github-token: ${{ secrets.GITHUB_TOKEN }}
# Optional, the directory to validate, defaults to the repository root
# working-directory:
# Optional, additional arguments to pass to the `flipt` command

Check failure on line 24 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
# args:

Check failure on line 25 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
# Optional, the version of Flipt to install, defaults to the latest release

Check failure on line 26 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
# version:

Check failure on line 27 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
# Optional, the directory to run Flipt against, defaults to the repository root

Check failure on line 28 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
# working-directory:

Check failure on line 29 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`

- run: flipt validate
```
Other commands that may be useful to run in your workflows include:
- [flipt bundle](https://www.flipt.io/docs/cli/commands/bundle)
- [flipt export](https://www.flipt.io/docs/cli/commands/export)
- [flipt import](https://www.flipt.io/docs/cli/commands/import)

Check failure on line 38 in tooling/github-actions.mdx

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎`

0 comments on commit b21458f

Please sign in to comment.