Merge pull request #12792 from id/0327-ci-keep-master-green-do-not-rerun-self

ci: in Keep master green workflow, do not try to rerun self
This commit is contained in:
Ivan Dyachkov 2024-03-27 16:08:33 +01:00 committed by GitHub
commit 59ec3d3a75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -31,8 +31,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --method GET -f head_sha=$(git rev-parse HEAD) -f status=completed -f exclude_pull_requests=true /repos/emqx/emqx/actions/runs > runs.json
for id in $(jq -r '.workflow_runs[] | select((."conclusion" != "success") and .run_attempt < 3) | .id' runs.json); do
gh api --method GET -f head_branch=master -f status=completed -f exclude_pull_requests=true /repos/emqx/emqx/actions/runs > runs.json
for id in $(jq -r '.workflow_runs[] | select((."conclusion" == "failure") and (."name" != "Keep master green") and .run_attempt < 3) | .id' runs.json); do
echo "rerun https://github.com/emqx/emqx/actions/runs/$id"
gh api --method POST /repos/emqx/emqx/actions/runs/$id/rerun-failed-jobs
gh api --method POST /repos/emqx/emqx/actions/runs/$id/rerun-failed-jobs || true
done

View File

@ -29,7 +29,7 @@ set +e
docker run --rm -i ${DOCKER_TERMINAL_OPT} --name spellcheck \
-v "${PROJ_ROOT}"/scripts/spellcheck/dicts:/dicts \
-v "$SCHEMA":/schema.json \
ghcr.io/emqx/emqx-schema-validate:0.5.0 -j 10 /schema.json
ghcr.io/emqx/emqx-schema-validate:0.5.1 -j 10 /schema.json
result="$?"