|
| 1 | +name: test staging cilock |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +permissions: |
| 7 | + id-token: write |
| 8 | + contents: read |
| 9 | + |
| 10 | +env: |
| 11 | + STAGING_URL: https://platform.aws-sandbox-staging.testifysec.dev |
| 12 | + CILOCK_VERSION: v1.3.1 |
| 13 | + |
| 14 | +jobs: |
| 15 | + cilock-action: |
| 16 | + name: cilock-action test |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - uses: aflock-ai/cilock-action@v1 |
| 22 | + with: |
| 23 | + step: test-action |
| 24 | + command: echo "testing cilock-action against staging" |
| 25 | + attestations: environment git github |
| 26 | + fulcio-url: ${{ env.STAGING_URL }} |
| 27 | + archivista-server: ${{ env.STAGING_URL }}/archivista |
| 28 | + timestamp-servers: ${{ env.STAGING_URL }}/api/v1/timestamp |
| 29 | + env: |
| 30 | + INPUT_FULCIO_USE_HTTP: "true" |
| 31 | + TESTIFYSEC_API_KEY: ${{ secrets.TESTIFYSEC_STAGING_API_KEY }} |
| 32 | + |
| 33 | + cilock-cli: |
| 34 | + name: cilock CLI test |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + |
| 39 | + - name: download cilock |
| 40 | + run: | |
| 41 | + curl -sSL "https://github.com/aflock-ai/rookery/releases/download/${CILOCK_VERSION}/cilock-${CILOCK_VERSION}-linux-amd64.tar.gz" | tar xz |
| 42 | + chmod +x cilock |
| 43 | + sudo mv cilock /usr/local/bin/ |
| 44 | +
|
| 45 | + - name: get oidc token |
| 46 | + id: oidc |
| 47 | + uses: actions/github-script@v7 |
| 48 | + with: |
| 49 | + script: return await core.getIDToken("sigstore") |
| 50 | + result-encoding: string |
| 51 | + |
| 52 | + - name: run cilock cli |
| 53 | + run: | |
| 54 | + cilock run --step test-cli \ |
| 55 | + --signer-fulcio-url "$STAGING_URL" \ |
| 56 | + --signer-fulcio-use-http \ |
| 57 | + --signer-fulcio-token "${{ steps.oidc.outputs.result }}" \ |
| 58 | + --signer-fulcio-oidc-client-id sigstore \ |
| 59 | + --signer-fulcio-oidc-issuer https://token.actions.githubusercontent.com \ |
| 60 | + --timestamp-servers "$STAGING_URL/api/v1/timestamp" \ |
| 61 | + --enable-archivista \ |
| 62 | + --archivista-server "$STAGING_URL/archivista" \ |
| 63 | + --archivista-headers "Authorization: wit-${{ secrets.TESTIFYSEC_STAGING_API_KEY }}" \ |
| 64 | + -- echo "testing cilock CLI against staging" |
0 commit comments