Skip to content

Commit

Permalink
feat: add gh actions / tooling section
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Oct 18, 2023
1 parent cd71c09 commit b01b53f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
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:
```

0 comments on commit b01b53f

Please sign in to comment.