Running Fixinator on Github Actions - foundeo/fixinator GitHub Wiki

There are many ways to run Fixinator inside of a Github Actions workflow.

First create FIXINATOR_API_KEY repository secret

You can create a repository level secret by going to your repository home page on github, then:

  1. Click on Settings in the repository menu
  2. Click on Secrets in the repository settings menu
  3. Click on the New repository secret button on the top right
  4. 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.

Fixinator Github Action

You can use our Fixinator Github Action, from the GitHub Actions Marketplace or just as easily you can use our docker based approach below.

Running Fixinator on every commit

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@v2
    - name: Run Fixinator
      run: box fixinator
      env:
        FIXINATOR_API_KEY: ${{ secrets.FIXINATOR_API_KEY }}

Running on a Schedule

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@v2
    - name: Run Fixinator
      run: box fixinator
      env:
        FIXINATOR_API_KEY: ${{ secrets.FIXINATOR_API_KEY }}

Example Repositories using Fixinator