Skip to content

Commit 7374f0b

Browse files
DilumAluthgeKristofferC
authored andcommitted
CI (Buildkite, GHA): Fix some bugs in the "Retry" workflow (#42657)
(cherry picked from commit 2bdbc6f)
1 parent a97cdfc commit 7374f0b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/rerun_failed.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ jobs:
5050
rerun-failed-buildkite-jobs:
5151
name: Rerun Failed Buildkite Jobs
5252
runs-on: ubuntu-latest
53-
if: (github.repository == 'DilumAluthge/julia') && ((github.event_name == 'pull_request_target' && github.event.action == 'reopened') || (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/buildkite rerun failed'))
53+
if: (github.repository == 'JuliaLang/julia') && ((github.event_name == 'pull_request_target' && github.event.action == 'reopened') || (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/buildkite rerun failed'))
5454
steps:
55+
# For security reasons, we do not checkout any code in this workflow.
5556
- name: Check organization membership
5657
env:
5758
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -60,6 +61,7 @@ jobs:
6061
if [[ "${{ github.event.action }}" == "reopened" ]]; then
6162
echo "This is a \"reopened\" event, so we do not need to check the user's organization membership."
6263
echo "GOOD_TO_PROCEED=yes" >> ${GITHUB_ENV:?}
64+
echo "PULL_REQUEST_NUMBER=${{ github.event.number }}" >> ${GITHUB_ENV:?}
6365
else
6466
echo "ERROR: The github.event_name is \"pull_request_target\", but the github.event.action is not \"reopened\"."
6567
exit 1
@@ -71,17 +73,20 @@ jobs:
7173
if [[ "${USER_IS_ORGANIZATION_MEMBER:?}" == "true" ]]; then
7274
echo "The \"${{ github.event.sender.login }}\" user is a public member of the JuliaLang organization."
7375
echo "GOOD_TO_PROCEED=yes" >> ${GITHUB_ENV:?}
76+
echo "PULL_REQUEST_NUMBER=${{ github.event.issue.number }}" >> ${GITHUB_ENV:?}
7477
else
7578
echo "ERROR: the \"${{ github.event.sender.login }}\" user is NOT a public member of the JuliaLang organization."
7679
echo "If you are a member, please make sure that you have publicized your membership."
7780
exit 1
7881
fi
7982
fi
80-
# For security reasons, we do not checkout any code in this workflow.
83+
- run: |
84+
echo "GOOD_TO_PROCEED: ${{ env.GOOD_TO_PROCEED }}"
85+
echo "PULL_REQUEST_NUMBER: ${{ env.PULL_REQUEST_NUMBER }}"
8186
- uses: JuliaLang/buildkite-rerun-failed@057f6f2d37aa29a57b7679fd2af0df1d9f9188b4
8287
if: env.GOOD_TO_PROCEED == 'yes'
8388
with:
8489
buildkite_api_token: ${{ secrets.BUILDKITE_API_TOKEN_RETRY }}
8590
buildkite_organization_slug: 'julialang'
8691
buildkite_pipeline_slug: 'julia-master'
87-
pr_number: ${{github.event.number}}
92+
pr_number: ${{ env.PULL_REQUEST_NUMBER }}

0 commit comments

Comments
 (0)