-
Notifications
You must be signed in to change notification settings - Fork 11
Running Fixinator on Github Actions
There are many ways to run Fixinator inside of a Github Actions workflow.
You can create a repository level secret by going to your repository home page on github, then:
- Click on
Settings
in the repository menu - Click on
Secrets
in the repository settings menu - Click on the
New repository secret
button on the top right - Enter the name
FIXINATOR_API_KEY
and paste your Fixinator API key in the value text box. If you don't have a Fixinator API key yet, you can request a free trial key.
Tip: Create an organizational level secret if you are going to be adding fixinator to more than one repository, then you can update it in one place as needed.
Once you have created the secret, it becomes available to your workflows scripts via the variable ${{ secrets.FIXINATOR_API_KEY }}
. Github Actions will protect the secret, and prevent it from being output in the build logs.
You can use our Fixinator Github Action, from the GitHub Actions Marketplace or just as easily you can use our docker based approach below.
In this example every time we push to the main
branch fixinator runs. To enable this workflow on github actions, create a .yml
file in the root of your repository in a folder .github/workflows/
for example: `.github/workflows/fixinator.yml':
on:
push:
branches: [ main ]
jobs:
fixinator:
runs-on: ubuntu-latest
container:
image: ghcr.io/foundeo/fixinator-docker/fixinator-docker:latest
steps:
- uses: actions/checkout@v4
- name: Run Fixinator
run: box fixinator
env:
FIXINATOR_API_KEY: ${{ secrets.FIXINATOR_API_KEY }}
Here's an example showing how you can run Fixinator each month:
name: Run Fixinator Monthly
# Run at 9:30 UTC on the First of every month
on:
schedule:
- cron: '30 9 1 * *'
jobs:
fixinator:
runs-on: ubuntu-latest
container:
image: ghcr.io/foundeo/fixinator-docker/fixinator-docker:latest
steps:
- uses: actions/checkout@v4
- name: Run Fixinator
run: box fixinator
env:
FIXINATOR_API_KEY: ${{ secrets.FIXINATOR_API_KEY }}