From 082b23596120c7be46c2e714d962f7e34a8f65e8 Mon Sep 17 00:00:00 2001 From: Miguel Martinez Date: Thu, 30 Oct 2025 01:32:49 +0100 Subject: [PATCH 1/2] ci: add daily SCM data gathering Signed-off-by: Miguel Martinez --- .../workflows/scm_configuration_check.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/scm_configuration_check.yaml diff --git a/.github/workflows/scm_configuration_check.yaml b/.github/workflows/scm_configuration_check.yaml new file mode 100644 index 000000000..da9f3fdc6 --- /dev/null +++ b/.github/workflows/scm_configuration_check.yaml @@ -0,0 +1,53 @@ +name: Daily SCM Configuration Check + +on: + schedule: + # Run daily at 9:00 AM UTC + - cron: '0 9 * * *' + workflow_dispatch: # Allow manual triggering + +jobs: + scm-configuration-check: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + env: + CHAINLOOP_TOKEN: ${{ secrets.CHAINLOOP_TOKEN }} + CHAINLOOP_WORKFLOW_NAME: "scm-configuration-check" + CHAINLOOP_PROJECT_NAME: "chainloop-platform" + + steps: + - uses: actions/checkout@v4 + + - name: Install Chainloop + run: | + curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s -- -ee + + - name: Initialize Attestation + run: | + chainloop attestation init --workflow ${CHAINLOOP_WORKFLOW_NAME} --project ${CHAINLOOP_PROJECT_NAME} + + - name: Gather runner context data + run: | + chainloop gather-runner-context --runner-token ${{ secrets.PAT_ADMIN }} + + - name: Add runner context material to attestation + run: | + chainloop attestation add --name runner-context --value ./runner-context.json --kind CHAINLOOP_RUNNER_CONTEXT + + - name: Finish and Record Attestation + if: ${{ success() }} + run: | + chainloop attestation push --exception-bypass-policy-check + + - name: Mark attestation as failed + if: ${{ failure() }} + run: | + chainloop attestation reset + + - name: Mark attestation as cancelled + if: ${{ cancelled() }} + run: | + chainloop attestation reset --trigger cancellation From 941119dc440ecd274bf0556aad3f941cd62c20b8 Mon Sep 17 00:00:00 2001 From: Miguel Martinez Date: Thu, 30 Oct 2025 01:33:33 +0100 Subject: [PATCH 2/2] ci: add daily SCM data gathering Signed-off-by: Miguel Martinez --- .github/workflows/scm_configuration_check.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scm_configuration_check.yaml b/.github/workflows/scm_configuration_check.yaml index da9f3fdc6..31dd9bf0f 100644 --- a/.github/workflows/scm_configuration_check.yaml +++ b/.github/workflows/scm_configuration_check.yaml @@ -3,7 +3,7 @@ name: Daily SCM Configuration Check on: schedule: # Run daily at 9:00 AM UTC - - cron: '0 9 * * *' + - cron: "0 9 * * *" workflow_dispatch: # Allow manual triggering jobs: @@ -15,15 +15,15 @@ jobs: env: CHAINLOOP_TOKEN: ${{ secrets.CHAINLOOP_TOKEN }} - CHAINLOOP_WORKFLOW_NAME: "scm-configuration-check" - CHAINLOOP_PROJECT_NAME: "chainloop-platform" + CHAINLOOP_WORKFLOW_NAME: scm-configuration-check + CHAINLOOP_PROJECT_NAME: chainloop steps: - uses: actions/checkout@v4 - name: Install Chainloop run: | - curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s -- -ee + curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s - name: Initialize Attestation run: |