Add scorecard output to GitHub Action
complete
Dudi - Port team
complete
Done :)
This is an example showing how to save the value of a specific scorecard as an output that can be used in later stages of the GitHub workflow:
SCORE=$(echo '${{ steps.port-github-action.outputs.entity }}' | jq -r .scorecards.ProductionReadiness.level)
Extended (showing both how to extract the value and how to use it in future steps):
- name: Get scorecard score
id: get-scorecard-score
run: |
echo "SCORE=$(echo '${{ steps.port-github-action.outputs.entity }}' | jq -r .scorecards.ProductionReadiness.level)" >> $GITHUB_OUTPUT
- name: Scorecard data debugging info
run: |
echo "Production Readiness score: ${{ steps.get-scorecard-score.outputs.SCORE }}"