Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 3 additions & 40 deletions .github/workflows/gate-attestation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,8 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
gate-attestation:
name: gate-attestation
runs-on: ubuntu-latest
steps:
- name: Pass trusted automation PRs
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'release-please[bot]' }}
run: echo "Gate attestation waived for trusted automation actor."

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'release-please[bot]' }}
with:
fetch-depth: 0
persist-credentials: false

- name: Verify Gate-Passed trailer
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'release-please[bot]' }}
run: |
commits=$(git log --format="%H" "origin/${{ github.base_ref }}..HEAD")
if [ -z "$commits" ]; then
echo "ERROR: No commits found in PR"
exit 1
fi

found=false
for sha in $commits; do
body=$(git log -1 --format="%b" "$sha")
if echo "$body" | grep -q "^Gate-Passed:"; then
version=$(echo "$body" | grep "^Gate-Passed:" | head -1)
echo "Found gate attestation: $version"
found=true
break
fi
done

if [ "$found" = false ]; then
echo "ERROR: No Gate-Passed trailer found in any PR commit."
echo "Run the local gate and commit with the trailer."
exit 1
fi
gate:
uses: forkwright/.github/.github/workflows/gate-attestation.yml@5be130bfebd5165d3221f1896f96b5ce6e93bf9b