Skip to content

jitsecurity/jit-sync-teams-github-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

Create Teams GitHub Action

This action creates teams in JIT Security using the jit-customer-scripts repo.
You need to provide the following, which we recommend storing in Github Secrets:

Inputs

  • JIT_CLIENT_ID: The JIT Client ID.
  • JIT_CLIENT_SECRET: The JIT Client Secret.
  • ORGANIZATION_NAME: The name of the GitHub organization.
  • GITHUB_API_TOKEN: The GitHub Personal Access Token.
  • TEAM_WILDCARD_TO_EXCLUDE: A wildcard team name to exclude from the teams that are created.

Outputs

None.

Example

name: Sync Jit Teams
on:
  schedule:
    - cron: "0 3 * * *"
  workflow_dispatch:

jobs:
  sync-teams:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v3
    - name: Call action
      uses: jitsecurity/[email protected]
      with:
        JIT_CLIENT_ID: ${{ secrets.JIT_CLIENT_ID }}
        JIT_CLIENT_SECRET: ${{ secrets.JIT_CLIENT_SECRET }}
        ORGANIZATION_NAME: ${{ github.repository_owner }}
        GITHUB_API_TOKEN: ${{ secrets.MY_GITHUB_API_TOKEN }}
        TEAM_WILDCARD_TO_EXCLUDE: "*dev*, *test*"