File tree 2 files changed +32
-43
lines changed
2 files changed +32
-43
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # Workflows, like this one, that are triggered by PRs submitted
3
+ # from forked repositories are severly limited in what they can do
4
+ # for security reasons. For instance, they can't add or remove
5
+ # labels or comments even on the PR that triggered them. Since
6
+ # we need to both of those things, GitHub recommends creating a
7
+ # separate workflow that does those tasks that's triggered when
8
+ # this PR workflow starts or finishes. Since that workflow isn't
9
+ # being run in the context of a forked repo, it has all the
10
+ # privileges needed to add and remove labels and comments. The
11
+ # accompanying OnPRStateChangedPriv workflow does just that.
12
+
13
+ name : PRChanged
14
+ # WARNING! The run name MUST start with "PR <pr_number>".
15
+ # The accompanying privleged workflow parses this to find
16
+ # the PR number. It's the only reliable way it can get it.
17
+ run-name : " PR ${{ github.event.number }} Changed by ${{ github.actor }}"
18
+ on :
19
+ pull_request :
20
+ types : [ labeled ]
21
+
22
+ jobs :
23
+ TestCalled :
24
+ concurrency :
25
+ group : check-${{ github.event.number }}
26
+ cancel-in-progress : true
27
+ uses : ./.github/workflows/TestCalledWorkflow.yml
28
+ with :
29
+ jobname : AAAA
Original file line number Diff line number Diff line change 11
11
jobname :
12
12
type : string
13
13
required : true
14
- secrets :
15
- TOKEN :
16
- required : true
17
14
18
15
env :
19
16
ACTIONS_OWNER : asterisk
20
17
ACTIONS_REPO : asterisk-ci-actions
21
18
ACTIONS_BRANCH : main
22
19
SCRIPT_DIR : ${{ github.workspace }}/asterisk-ci-actions/scripts
23
- GH_TOKEN : ${{secrets.TOKEN}}
24
20
RUN_ID : ${{ github.run_id }}
25
21
26
22
jobs :
38
34
39
35
- name : test
40
36
run : |
41
- mkdir logs
42
- step_summary=""
43
- step_summary+="FAILURE: rest_api/recording/duration\nFAILURE: rest_api/recording/nominal"
44
- echo -e "$step_summary" >> logs/job_summary.txt
45
- exit 1
46
- - name : Save Output
47
- id : save-output
48
- if : ${{ always() }}
49
- uses : actions/upload-artifact@v4
50
- with :
51
- name : ${{inputs.jobname}}-Job1
52
- path : |
53
- logs
37
+ sleep 120
38
+ exit 0
54
39
55
40
Job2 :
56
41
runs-on : ubuntu-latest
61
46
steps :
62
47
- name : test
63
48
run : |
64
- mkdir logs
65
- step_summary=""
66
- step_summary+="FAILURE: rest_api/recording/XXXXX\nFAILURE: rest_api/recording/YYYYYYY"
67
- echo -e "$step_summary" >> logs/job_summary.txt
68
- echo "::group::outer group"
69
- echo "outer 1"
70
- echo "outer 2"
71
- echo "::group::inner group"
72
- echo "inner 1"
73
- echo "inner 2"
74
- echo "::endgroup::"
75
- echo "outer 3"
76
- echo "outer 4"
77
- echo "::endgroup::"
78
-
49
+ sleep 120
79
50
exit 0
80
- - name : Save Output
81
- id : save-output
82
- if : ${{ always() }}
83
- uses : actions/upload-artifact@v4
84
- with :
85
- name : ${{inputs.jobname}}-Job2
86
- path : |
87
- logs
88
- - name : DumpEnvironment
89
- uses : asterisk/asterisk-ci-actions/DumpEnvironmentAction@main
90
-
You can’t perform that action at this time.
0 commit comments