Setup kosli #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Setup kosli | |
| on: | |
| workflow_dispatch: | |
| env: | |
| # kosli commands picks up org, flow, trail and api-token from these environment variables | |
| KOSLI_ORG: "kosli-public" | |
| KOSLI_API_TOKEN: "${{ secrets.KOSLI_PUBLIC_API_TOKEN }}" | |
| KOSLI_CLI_VERSION: "${{ vars.KOSLI_CLI_VERSION }}" | |
| # KOSLI_DRY_RUN: true | |
| jobs: | |
| create-flows: | |
| name: Create kosli flows and environments | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Kosli cli | |
| uses: kosli-dev/setup-cli-action@v2 | |
| with: | |
| version: | |
| ${{ vars.KOSLI_CLI_VERSION }} | |
| ### flows ### | |
| - name: Create github-release-example-backend flow | |
| run: | |
| kosli create flow github-release-example-backend | |
| --description "Track veracode example attestations for backend" | |
| --template-file kosli-flow-templates/backend-template.yml | |
| ### Custom attestation types ### | |
| - name: Create approval-github-workflow attestation type | |
| run: | |
| kosli create attestation-type approval-github-workflow | |
| --description "Approval from GitHub workflow" | |
| --schema custom-attestation-types/approval-github-workflow.yml | |
| --jq '.action == "workflows.approve_workflow_job"' | |
| --jq '.actor != ""' |