ci: wire governance traceability env in gitea workflow and guard zero SHA (#330)
This commit is contained in:
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -29,11 +29,13 @@ jobs:
|
||||
GOVERNANCE_PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
GOVERNANCE_PR_BODY: ${{ github.event.pull_request.body }}
|
||||
run: |
|
||||
RANGE=""
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
RANGE="${{ github.event.pull_request.base.sha }}...${{ github.sha }}"
|
||||
python3 scripts/validate_governance_assets.py "$RANGE"
|
||||
elif [ "${{ github.event_name }}" = "push" ]; then
|
||||
elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
|
||||
RANGE="${{ github.event.before }}...${{ github.sha }}"
|
||||
fi
|
||||
if [ -n "$RANGE" ]; then
|
||||
python3 scripts/validate_governance_assets.py "$RANGE"
|
||||
else
|
||||
python3 scripts/validate_governance_assets.py
|
||||
|
||||
Reference in New Issue
Block a user