Skip to content

Commit 262d688

Browse files
authored
Fix CI problems (#33)
1 parent 47e1b51 commit 262d688

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

.github/actions/list-pr/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'List Pull Requests'
1+
name: 'List pull requests'
22
description: 'list and put output pull requests'
33
inputs:
44
owner:
@@ -34,16 +34,16 @@ runs:
3434
github-token: ${{ inputs.token }}
3535
result-encoding: string
3636
script: |
37-
const timeRange = parseInt("24") * 60 * 60 * 1000;
37+
const timeRange = parseInt("${{ inputs.hours }}") * 60 * 60 * 1000;
3838
const sinceTime = new Date(Date.now() - timeRange).toISOString();
39-
const input_labels = "";
39+
const input_labels = "${{ inputs.labels }}";
4040
const labels = input_labels
4141
? input_labels.split(/[,\n]/).map(label => label.trim())
4242
: [];
4343
4444
const iterator = await github.paginate.iterator(github.rest.pulls.list, {
45-
owner: "pytorch",
46-
repo: "pytorch",
45+
owner: "${{ inputs.owner }}",
46+
repo: "${{ inputs.repository }}",
4747
state: "open",
4848
sort: "created",
4949
direction: "desc",

.github/workflows/ascend_npu_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ on:
7171

7272
# Only cancel the previous runs when triggered by a pull_request event
7373
concurrency:
74-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
74+
group: ${{ github.workflow }}
7575
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7676

7777
jobs:
@@ -83,6 +83,7 @@ jobs:
8383
image: ${{ steps.set-env.outputs.image }}
8484
device: ${{ steps.set-env.outputs.device }}
8585
ref: ${{ steps.list-ref.outputs.ref }}
86+
pr-number: ${{ steps.list-ref.outputs.pr_number }}
8687
steps:
8788
- name: Set environment params
8889
id: set-env

.github/workflows/dispatch-event.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: 'Dispatch PyTorch events'
22

33
on:
4+
pull_request:
5+
branches:
6+
- 'main'
7+
paths:
8+
- '.github/workflows/dispatch-event.yml'
9+
- '.github/actions/list-pr/**'
10+
- '!**/*.md'
11+
412
schedule:
513
- cron: '0 12 * * *'
614

.github/workflows/redispatch-event.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
redispatch-pr-event:
9-
name: Redispatch PyTorch events
9+
name: 'Redispatch PyTorch events for #${{ github.event.client_payload.pull_request.number }}'
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout

0 commit comments

Comments
 (0)