Fluent Bit and Fluentd configurations are simple to use. Over time, the use of these configurations will grow and complexity with it. This action will help stay away from common pitfalls. It will add linting to your development process through workflows.
The following are steps to set up fluent linter action in your repository.
The first step is to create the workflow in your repository. We describe two ways: via Github UI or manually.
Create the following directory in your repository .github/workflows/
Under .github/workflows/
create a file called fluent-linter.yml
Open .github/workflows/fluent-linter.yml
paste the following content:
on: pull_request
name: Fluent-linter
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: fluent_linter_action
uses: calyptia/fluent-linter-action@main
with:
calyptia-api-key: ${{ secrets.CALYPTIA_API_KEY }}
follow-symbolic-links: 'true' # this is optional. It defaults to false.
config-location-glob: '*.conf'
Make sure to change config-location-glob
to a glob that points to your Fluentd
and Fluent Bit
configuration within the repository. You can use this page to make sure your glob will match the necessary files.
If you want to see it in action, take a look at the example here
config-location-glob
to a glob that points to your fluentd and fluent-bit configuration within the repository.If everything goes well, you will see an editor that will let you change anything on the workflow before committing. You can change the version from main
to a specific one.
Make sure to commit the workflow to your repository.
For more information about using workflows, take a look at\ github documentation
If these instructions are not working for you, you can try the Manual approach
In order to get the full linting capabilities from this action, you will need to get a Calyptia token. The token is easy to get. Head over to Calyptia Cloud and log in (you can use your GitHub account). On the left panel, find Account > settings > Generate API key. Give a recognizable name for safekeeping (you could name it linter). Please copy this token.
The last step will be to use the API Key we generated in Calyptia Cloud.
Add a new secret to your repository find Settings > Secrets > New repository secret. The name for this secret should be calyptia-api-key
. Paste the secret you obtained in the step before.
note: Settings is often next to the insights tab. If you can't see the option, you are missing permissions.
fluent-linter-action
only works with Fluent Bit
configurations. Fluentd
configurations will be available shortly.fluent-linter-action
uses the latest master branch of Fluent Bit
to run the checks. Please follow this issue for updates.fluent-linter-action
does not support ignoring or excluding any configuration from linting. Please follow this issue for updates. Be aware of this if using custom plugins or images/builds which may use invalid configuration options from the point of view of the main Fluent Bit version.Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the Apache-2.0 License. See LICENSE
for more information.