Skip to content

Commit

Permalink
Add chainloop commands
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Rodriguez <[email protected]>
  • Loading branch information
javirln committed May 14, 2024
1 parent ab83dd7 commit 00447a9
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/package_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ jobs:
secrets:
api_token: ${{ secrets.CHAINLOOP_ONBOARDING_API_TOKEN }}

# package:
# name: Package and push Helm Chart
# runs-on: ubuntu-latest
# permissions:
# packages: write
# env:
# CHAINLOOP_VERSION: 0.86.0
# CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ONBOARDING_API_TOKEN }}
# steps:
# - name: Install Chainloop
# run: |
# curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s -- --version v${{ env.CHAINLOOP_VERSION }}
#
# - name: Docker login to Github Packages
# uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Install Helm
# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
#
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
#
# - name: Initialize Attestation
# run: |
# chainloop attestation init --workflow_name chainloop-vault-helm-package
package:
name: Package and push Helm Chart
runs-on: ubuntu-latest
permissions:
packages: write
env:
CHAINLOOP_VERSION: 0.86.0
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ONBOARDING_API_TOKEN }}
steps:
- name: Install Chainloop
run: |
curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s -- --version v${{ env.CHAINLOOP_VERSION }}
- name: Docker login to Github Packages
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Initialize Attestation
run: |
chainloop attestation init --workflow_name chainloop-vault-helm-package
#
# - name: Package Chart
# run: helm package deployment/chainloop/
Expand All @@ -73,21 +73,21 @@ jobs:
# helm push ${pkg} oci://ghcr.io/chainloop-dev/charts
# done
#
# - name: Finish and Record Attestation
# if: ${{ success() }}
# run: |
# chainloop attestation status --full
# chainloop attestation push --key env://CHAINLOOP_SIGNING_KEY
# env:
# CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
# CHAINLOOP_SIGNING_KEY: ${{ secrets.COSIGN_KEY }}
#
# - name: Mark attestation as failed
# if: ${{ failure() }}
# run: |
# chainloop attestation reset
#
# - name: Mark attestation as cancelled
# if: ${{ cancelled() }}
# run: |
# chainloop attestation reset --trigger cancellation
- name: Finish and Record Attestation
if: ${{ success() }}
run: |
chainloop attestation status --full
chainloop attestation push --key env://CHAINLOOP_SIGNING_KEY
env:
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
CHAINLOOP_SIGNING_KEY: ${{ secrets.COSIGN_KEY }}

- name: Mark attestation as failed
if: ${{ failure() }}
run: |
chainloop attestation reset
- name: Mark attestation as cancelled
if: ${{ cancelled() }}
run: |
chainloop attestation reset --trigger cancellation

0 comments on commit 00447a9

Please sign in to comment.