File tree Expand file tree Collapse file tree 2 files changed +32
-43
lines changed
Expand file tree Collapse file tree 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 1111 jobname :
1212 type : string
1313 required : true
14- secrets :
15- TOKEN :
16- required : true
1714
1815env :
1916 ACTIONS_OWNER : asterisk
2017 ACTIONS_REPO : asterisk-ci-actions
2118 ACTIONS_BRANCH : main
2219 SCRIPT_DIR : ${{ github.workspace }}/asterisk-ci-actions/scripts
23- GH_TOKEN : ${{secrets.TOKEN}}
2420 RUN_ID : ${{ github.run_id }}
2521
2622jobs :
3834
3935 - name : test
4036 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
5439
5540 Job2 :
5641 runs-on : ubuntu-latest
6146 steps :
6247 - name : test
6348 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
7950 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