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
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

permissions:
contents: read
checks: read
id-token: write

jobs:
Expand All @@ -17,6 +18,26 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5

- name: Require tests to have passed for this commit
env:
GH_TOKEN: ${{ github.token }}
SHA: ${{ github.sha }}
REPO: ${{ github.repository }}
run: |
echo "Checking required CI result for commit $SHA"

CONCLUSION=$(gh api "repos/$REPO/commits/$SHA/check-runs" \
--jq '.check_runs[] | select(.name == "test") | .conclusion' \
| head -n 1)

if [ "$CONCLUSION" != "success" ]; then
echo "Required CI check 'test' has not passed for commit $SHA."
echo "Actual conclusion: ${CONCLUSION:-not found}"
exit 1
fi

echo "Required CI check 'test' passed."

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
Expand Down