Skip to content

Commit 5311cfb

Browse files
authored
Reapply "feat(ci): Use reusable workflow creation on Helm package (#775)" (#802) (#804)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent b99b92d commit 5311cfb

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/package_chart.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,28 @@ permissions:
1212
contents: read
1313

1414
jobs:
15+
# This reusable workflow inspects if the given workflow_name exists on Chainloop. If the Workflow does not exist
16+
# it will create one with an empty contract ready for operators to be filled. Otherwise, if found, it will just
17+
# be ignored and the process will continue. For this to work it's using a pre-created API Token
18+
onboard_workflow:
19+
name: Onboard Chainloop Workflow
20+
uses: chainloop-dev/labs/.github/workflows/chainloop_onboard.yml@4173e015dbd5dc2a8802555c268da63d57bbe576
21+
with:
22+
project: "chainloop"
23+
workflow_name: "chainloop-vault-helm-package"
24+
secrets:
25+
api_token: ${{ secrets.CHAINLOOP_API_TOKEN }}
26+
1527
package:
1628
name: Package and push Helm Chart
1729
runs-on: ubuntu-latest
30+
needs: onboard_workflow
1831
permissions:
1932
packages: write
2033
env:
21-
CHAINLOOP_VERSION: 0.86.0
22-
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_CHART_PACKAGE }}
34+
CHAINLOOP_VERSION: 0.88.0
35+
CHAINLOOP_TOKEN: ${{ secrets.CHAINLOOP_API_TOKEN }}
36+
CHAINLOOP_WORKFLOW_NAME: ${{ needs.onboard_workflow.outputs.workflow_name }}
2337
steps:
2438
- name: Install Chainloop
2539
run: |
@@ -39,7 +53,7 @@ jobs:
3953

4054
- name: Initialize Attestation
4155
run: |
42-
chainloop attestation init
56+
chainloop attestation init --workflow-name ${CHAINLOOP_WORKFLOW_NAME}
4357
4458
- name: Package Chart
4559
run: helm package deployment/chainloop/

0 commit comments

Comments
 (0)