|
| 1 | +name: Attest Source Controls |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'main' |
| 7 | + |
| 8 | +env: |
| 9 | + KOSLI_ORG: kosli-public |
| 10 | + KOSLI_FLOW: test-code-review-action |
| 11 | + KOSLI_API_TOKEN: '${{ secrets.KOSLI_PUBLIC_API_TOKEN }}' |
| 12 | + |
| 13 | +jobs: |
| 14 | + setup: |
| 15 | + runs-on: ubuntu-24.04 |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + with: |
| 19 | + fetch-depth: 0 |
| 20 | + fetch-tags: true |
| 21 | + |
| 22 | + - name: Setup Kosli cli |
| 23 | + uses: kosli-dev/setup-cli-action@v2 |
| 24 | + with: |
| 25 | + version: ${{ vars.KOSLI_CLI_VERSION }} |
| 26 | + |
| 27 | + - name: Create Kosli Flow |
| 28 | + run: kosli create flow ${{ env.KOSLI_FLOW }} |
| 29 | + --template-file build-template.yml |
| 30 | + --description "Code Review Demo" |
| 31 | + |
| 32 | + - name: Begin Kosli Trail |
| 33 | + run: kosli begin trail "${{ github.sha }}" |
| 34 | + --flow ${{ env.KOSLI_FLOW }} |
| 35 | + |
| 36 | + - name: Attest pull-request evidence to Kosli |
| 37 | + run: kosli attest pullrequest github |
| 38 | + --name pull-request |
| 39 | + --flow ${{ env.KOSLI_FLOW }} |
| 40 | + --trail ${{ github.sha }} |
| 41 | + --github-token ${{ secrets.GITHUB_TOKEN }} |
| 42 | + |
| 43 | + |
| 44 | + # pull-request: |
| 45 | + # needs: [setup] |
| 46 | + # runs-on: ubuntu-24.04 |
| 47 | + # permissions: |
| 48 | + # id-token: write |
| 49 | + # contents: write |
| 50 | + # pull-requests: read |
| 51 | + |
| 52 | + # steps: |
| 53 | + # - name: Checkout |
| 54 | + # uses: actions/checkout@v4 |
| 55 | + # with: |
| 56 | + # fetch-depth: 0 |
| 57 | + # fetch-tags: true |
| 58 | + |
| 59 | + # - name: Setup Kosli cli |
| 60 | + # uses: kosli-dev/setup-cli-action@v2 |
| 61 | + # with: |
| 62 | + # version: ${{ vars.KOSLI_CLI_VERSION }} |
| 63 | + |
| 64 | + # - name: Attest pull-request evidence to Kosli |
| 65 | + # run: kosli attest pullrequest github |
| 66 | + # --name pull-request |
| 67 | + # --flow ${{ env.KOSLI_FLOW }} |
| 68 | + # --trail ${{ github.sha }} |
| 69 | + # --github-token ${{ secrets.GITHUB_TOKEN }} |
| 70 | + |
| 71 | + |
| 72 | + # code-review: |
| 73 | + # needs: [pull-request] |
| 74 | + # runs-on: ubuntu-24.04 |
| 75 | + # steps: |
| 76 | + # - name: Checkout |
| 77 | + # uses: actions/checkout@v4 |
| 78 | + # with: |
| 79 | + # fetch-depth: 0 |
| 80 | + # fetch-tags: true |
| 81 | + |
| 82 | + # - name: Code Review |
| 83 | + # uses: kosli-dev/control-actions/.github/actions/code-review@main |
| 84 | + # with: |
| 85 | + # base_ref: '1.0.0' |
| 86 | + # kosli_api_token: ${{ secrets.KOSLI_PUBLIC_API_TOKEN }} |
| 87 | + # kosli_org: 'kosli-public' |
| 88 | + # kosli_search_flow_name: 'test-code-review-action' |
| 89 | + # kosli_code_review_attestation_type: 'code-review' |
| 90 | + # kosli_code_review_attestation_name: 'code-review' |
| 91 | + # kosli_code_review_flow_name: 'test-code-review-action' |
| 92 | + # kosli_code_review_trail_name: ${{ github.sha }} |
0 commit comments