Github workflow

tip
When working with Github workflows, the best way to incorporate Datree is to use our official Github action.
TO-DO list for setting-up Datree in your CI
- Get your account token
- Set DATREE_TOKEN as a secret/environment variable
- Add datree to your CI script
CI config example
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
    
env:
  DATREE_TOKEN: ${{ secrets.DATREE_TOKEN }} 
jobs:
  k8sPolicyCheck:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        
      - name: Run Datree Policy Check
        uses: datreeio/action-datree@main
        with:
          path: '**/*.yaml'
          cliArguments: '--only-k8s-files'