Github integration

Introduction

You can integrate Flagship with Github in order to synchronize your Flag references in your codebase with Flagship.

Using the Codebase Analyzer, Flagship can look through your entire codebase in order to check for the reference of the flag inside your code.
The Flag references are then sent back to Flagship in order for you to view their references on the Flag page on the Flagship Platform.

How to integrate Flagship with Github

You can set up the codebase analyzer to run on a specific step of your Github CI pipeline:

.github/workflows/main.yml example:

on: [push]

jobs:
  flagship_flag_references:
    runs-on: ubuntu-latest
    name: A job to say hello
    steps:
    - name: Sync Flag References
      id: sync-flag-references
      uses: flagship.io/[email protected]
      with:
        flagshipToken: ${{ secrets.FLAGSHIP_API_TOKEN }}
        environmentId: ${{ secrets.FLAGSHIP_ENV_ID }}
        repositoryUrl: '${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}'
        repositoryBranch: ${{ env.GITHUB_REF }}

You can set up additional parameters to the Action to customize further your integration. See Github Repository for more details.

Any feedback? We would be really happy to have a quick chat!


Did this page help you?