Skip to content

Commit 16b0f3e

Browse files
committed
gha - move PR creation out of main workflow
This way we can set the correct permissions for the PR creation step
1 parent adcaeae commit 16b0f3e

File tree

2 files changed

+44
-29
lines changed

2 files changed

+44
-29
lines changed

.github/workflows/test-smokes.yml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ on:
3838
schedule:
3939
- cron: "0 6 * * *"
4040

41-
# this is require to cleanup julia cache
41+
# this is required to cleanup julia cache
4242
permissions:
4343
actions: write
4444
contents: read
@@ -289,35 +289,9 @@ jobs:
289289
working-directory: tests
290290
shell: pwsh
291291

292-
- name: Create Pull Request for new tests timing
293-
if: matrix.time-test
294-
id: cpr
295-
uses: peter-evans/create-pull-request@v6
296-
with:
297-
token: ${{ secrets.GITHUB_TOKEN }}
298-
add-paths: tests/timing-for-ci.txt
299-
commit-message: |
300-
timing for new tests [auto PR]
301-
branch: updates/timing-for-ci
302-
delete-branch: true
303-
assignees: cderv
304-
reviewers: cderv
305-
title: |
306-
[CI] Update timing file
307-
body: |
308-
This PR was created automatically with new timing test file for our parallel smoke tests.
309-
Please review and merge to trigger a new build of the website.
310-
311-
- name: Check auto PR outputs
312-
if: steps.cpr.outcome == 'success'
313-
run: |
314-
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
315-
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
316-
echo "Pull Request Action Performed - ${{ steps.cpr.outputs.pull-request-operation }}"
317-
318292
- name: Upload test timing file
319293
uses: actions/upload-artifact@v4
320-
if: matrix.time-test && ( failure() || cancelled())
294+
if: matrix.time-test
321295
with:
322296
name: timed test file
323297
path: tests/timing-for-ci.txt

.github/workflows/update-test-timing.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,52 @@ on:
66
- cron: "13 3 * * 1"
77

88
name: Update timing test file
9-
109
jobs:
1110
run-timed-tests:
1211
name: Running Tests to produce timed file
1312
uses: ./.github/workflows/test-smokes.yml
1413
with:
1514
buckets: ""
1615
time-test: true
16+
17+
create-pr:
18+
name: Create PR with updated timing file
19+
needs: run-timed-tests
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
steps:
25+
- name: Checkout Repo
26+
uses: actions/checkout@v4
27+
28+
- name: Download timing file artifact
29+
uses: actions/download-artifact@v4
30+
with:
31+
name: timed test file
32+
path: tests/
33+
34+
- name: Create Pull Request for new tests timing
35+
id: cpr
36+
uses: peter-evans/create-pull-request@v7
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
add-paths: tests/timing-for-ci.txt
40+
commit-message: |
41+
timing for new tests [auto PR]
42+
branch: updates/timing-for-ci
43+
delete-branch: true
44+
assignees: cderv
45+
reviewers: cderv
46+
title: |
47+
[CI] Update timing file
48+
body: |
49+
This PR was created automatically with new timing test file for our parallel smoke tests.
50+
Please review and merge to trigger a new build of the website.
51+
52+
- name: Check auto PR outputs
53+
if: steps.cpr.outcome == 'success'
54+
run: |
55+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
56+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
57+
echo "Pull Request Action Performed - ${{ steps.cpr.outputs.pull-request-operation }}"

0 commit comments

Comments
 (0)