Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add gh actions / tooling section #133

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/tooling/validate-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Run the Flipt binary with:
./flipt [--config OPTIONAL_PATH_TO_YOUR_CONFIG]
```

As of version [v1.23](https://github.com/flipt-io/flipt/releases/tag/v1.23.0), the Flipt binary will check in a few different locations for server configuration (in order):
Flipt will check in a few different locations for server configuration (in order):

1. `--config` flag as an override
2. `{{ USER_CONFIG_DIR }}/flipt/config.yml` (the `USER_CONFIG_DIR` value is based on your architecture and specified in the [Go documentation](https://pkg.go.dev/os#UserConfigDir))
Expand Down
6 changes: 6 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
"operations/upgrading"
]
},
{
"group": "Tooling",
"pages": [
"tooling/github-actions"
]
},
{
"group": "Overview",
"pages": ["reference/overview"]
Expand Down
31 changes: 31 additions & 0 deletions tooling/github-actions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: GitHub Actions
description: How to use our GitHub Actions to automate your workflows.
---

## Validate

![Flipt Validate Action](/images/tooling/validate-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 to use 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 [file-based backends](https://www.flipt.io/docs/configuration/storage#filesystem).

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.

### Usage

The following example demonstrates how to use the action in a GitHub workflow.

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

- uses: flipt-io/[email protected]
# 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:
```