Skip to content

Commit

Permalink
ci: sync with template repository
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 26, 2024
1 parent 56a0f39 commit 51d3568
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check
run: |
set -o errexit
set -o nounset
set -o pipefail
function checks() {
(gh pr checks "${{ github.event.pull_request.html_url }}" || true) |
grep --invert-match "${{ github.run_id }}"
}
function count() {
checks |
cut --fields=2 |
(grep --count "$@" || true)
}
while true; do
pending=$(count pending)
if ((pending > 0)); then
echo "Waiting for $pending checks to complete..."
sleep 60
else
break
fi
done
fail=$(count fail)
if ((fail > 0)); then
echo "$fail checks failed"
exit 1
else
echo "All checks passed"
exit 0
fi
env:
GH_TOKEN: ${{ github.token }}
uses: liblaf/template/.github/actions/check@main

merge:
name: Merge
Expand Down

0 comments on commit 51d3568

Please sign in to comment.