Skip to content

Commit 46f193b

Browse files
committed
Simplify main yml file
1 parent bab2138 commit 46f193b

File tree

3 files changed

+117
-105
lines changed

3 files changed

+117
-105
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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 }}

.github/workflows/main.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/release-code-review.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ on:
77

88
env:
99
KOSLI_ORG: kosli-public
10-
KOSLI_FLOW: code-review-demo-release
10+
KOSLI_FLOW: test-code-review-action
1111
KOSLI_API_TOKEN: '${{ secrets.KOSLI_PUBLIC_API_TOKEN }}'
1212

1313
jobs:
14-
1514
setup:
1615
runs-on: ubuntu-24.04
1716
steps:
@@ -25,23 +24,34 @@ jobs:
2524
with:
2625
version: ${{ vars.KOSLI_CLI_VERSION }}
2726

28-
- name: Create Kosli Flow
29-
run: kosli create flow ${{ env.KOSLI_FLOW }}
30-
--template-file release-template.yml
31-
--description "Code Review Demo Release"
27+
# - name: Create Kosli Flow
28+
# run: kosli create flow ${{ env.KOSLI_FLOW }}
29+
# --template-file release-template.yml
30+
# --description "Code Review Demo Release"
3231

3332
- name: Begin Kosli Trail
3433
run: kosli begin trail "${{ github.ref_name }}"
3534
--flow ${{ env.KOSLI_FLOW }}
3635

36+
3737
code-review:
3838
needs: [setup]
39-
uses: ./.github/workflows/code-review.yml
40-
with:
41-
kosli-org: kosli-public
42-
kosli-build-flow: code-review-demo
43-
kosli-release-flow: code-review-demo-release
44-
kosli-trail: ${{ github.ref_name }}
45-
base-tag: "1.0.0"
46-
secrets:
47-
kosli-api-token: ${{ secrets.KOSLI_PUBLIC_API_TOKEN }}
39+
runs-on: ubuntu-24.04
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
fetch-tags: true
46+
47+
- name: Code Review
48+
uses: kosli-dev/control-actions/.github/actions/code-review@main
49+
with:
50+
base_ref: '1.0.0'
51+
kosli_api_token: ${{ secrets.KOSLI_PUBLIC_API_TOKEN }}
52+
kosli_org: 'kosli-public'
53+
kosli_search_flow_name: 'test-code-review-action'
54+
kosli_code_review_attestation_type: 'code-review'
55+
kosli_code_review_attestation_name: 'code-review'
56+
kosli_code_review_flow_name: 'test-code-review-action'
57+
kosli_code_review_trail_name: ${{ github.ref_name }}

0 commit comments

Comments
 (0)