FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update Konflux references to b961f8b (#22522) · stackrox/stackrox@7f70070 · GitHub

/retest for GitHub Actions #11511

/retest for GitHub Actions

/retest for GitHub Actions #11511

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
name: /retest for GitHub Actions
on:
issue_comment:
types: [created]
jobs:
rerun-failed:
if: >-
github.event.issue.pull_request &&
github.event.comment.body == '/retest'
runs-on: ubuntu-slim
steps:
- name: Fetch PR head SHA
id: pr
env:
GH_TOKEN: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}
run: |
sha=$(gh api "${{ github.event.issue.pull_request.url }}" --jq '.head.sha')
echo "sha=$sha" >> "$GITHUB_OUTPUT"
- name: Rerun failed workflows
env:
GH_TOKEN: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}
run: |
failed_runs=$(gh api "repos/${{ github.repository }}/actions/runs?head_sha=${{ steps.pr.outputs.sha }}&event=pull_request&status=failure" --jq '.workflow_runs[].id')
if [ -z "$failed_runs" ]; then
echo "No failed workflow runs found"
exit 0
fi
for run_id in $failed_runs; do
echo "Rerunning failed jobs for run $run_id"
gh run rerun "$run_id" --failed --repo "${{ github.repository }}"
done

Back | FazBrowse Home | New Git URL