Skip to content

gehma jetzt

gehma jetzt #136

Workflow file for this run

#
# SPDX-License-Identifier: Apache-2.0
#
name: PDO CI
on: [pull_request, push]
jobs:
pdo_ci:
outputs:
img_hash_wawaka: ${{ steps.hash.outputs.img_hash_wawaka }}
img_hash_wawaka-opt: ${{ steps.hash.outputs.img_hash_wawaka-opt }}
if: "!contains(github.event.commits[0].message, '[skip ci]')"
name: PDO CI Job
runs-on: ubuntu-20.04
strategy:
matrix:
interpreter: [wawaka, wawaka-opt]
pdo_ledger_type: [ccf]
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Build and run tests
env:
PDO_INTERPRETER: ${{ matrix.interpreter }}
run: |
# The creation of a dummy branch is necessary for the CI tests
# to work on PRs. Based on empirical results, in the absence of
# this command, CI tests work on the main branch and on local
# branches. However, they fail as a PR is created.
git checkout -b ci-test-branch
. build/common-config.sh
make -C docker build_client
- name: Generate SBOM
uses: anchore/sbom-action@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
with:
image: pdo_client
artifact-name: "pdo_client_${{ matrix.interpreter }}.spdx.json"
upload-release-assets: false
- name: Get image hash
shell: bash
id: hash
run: |
# this extracts the sha256 hash
echo "img_hash_${{ matrix.interpreter }}=$(docker inspect pdo_client -f '{{ .ContainerConfig.Image }}' | sed 's/.*:/ pdo_client_${{ matrix.interpreter }}/' | sed 's/$/ pdo_client_${{ matrix.interpreter }}/' | base64 -w0" >> "$GITHUB_OUTPUT"
provenance:
needs: [pdo_ci]
strategy:
matrix:
interpreter: [wawaka, wakaka-opt]
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
contents: write # for uploading attestations.
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
base64-subjects: "${{ needs.pdo_ci.outputs[format('img_hash_{0}', matrix.interpreter)] }}"
provenance-name: "pdo_client_${{ matrix.interpreter }}.slsa.intoto.jsonl"