FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
stackrox/.github/workflows/retest_comment.yml at master · stackrox/stackrox · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stackrox
/
stackrox
Public
Notifications
You must be signed in to change notification settings
Fork
191
Star
1.3k
Code
Issues
54
Pull requests
603
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
stackrox
/
.github
/
workflows
/
retest_comment.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
34 lines (31 loc) · 1.04 KB
Breadcrumbs
stackrox
/
.github
/
workflows
/
retest_comment.yml
Copy path
File metadata and controls
34 lines (31 loc) · 1.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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