Skip to content

Keep master green #11365

Keep master green

Keep master green #11365

Workflow file for this run

---
name: Keep master green
on:
schedule:
# run hourly
- cron: "0 * * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
rerun-failed-jobs:
if: github.repository_owner == 'emqx'
runs-on: ubuntu-latest
permissions:
checks: read
actions: write
strategy:
fail-fast: false
matrix:
ref:
- master
- release-58
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
ref: ${{ matrix.ref }}
- name: run script
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
run: |
for id in $(gh run list --branch ${{ matrix.ref }} --workflow "Push Entrypoint" --commit $(git rev-parse HEAD) --status failure --json databaseId,attempt --jq '.[] | select(.attempt < 3) | .databaseId'); do
gh run rerun "$id" --failed
done