forked from aiqiaoy-test-org/crispy-system
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (94 loc) · 3.08 KB
/
Copy pathcalled-prt-test.yml
File metadata and controls
102 lines (94 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: reusable called prt (expected to fail)
on:
workflow_call:
inputs:
branchName:
description: Ref to pass to actions/checkout
required: true
type: string
pullRequestJSON:
description: JSON string of a pull_request payload object
required: true
type: string
jobs:
dump-payload:
runs-on: ubuntu-latest
steps:
- name: Dump full github.event payload
env:
GITHUB_EVENT_JSON: ${{ toJSON(github.event) }}
run: |
echo "$GITHUB_EVENT_JSON" | jq .
pr-head-sha:
runs-on: ubuntu-latest
steps:
- name: checkout v4
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: checkout opt-in
uses: actions/checkout@main
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
allow-unsafe-pr-checkout: true
- name: expected to fail
uses: actions/checkout@011c9c50dd621281dae1133f716823da4b0720e3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
pr-head-ref-and-repo:
runs-on: ubuntu-latest
steps:
- name: checkout v4
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: checkout opt-in
uses: actions/checkout@main
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
allow-unsafe-pr-checkout: true
- name: expected to fail
uses: actions/checkout@011c9c50dd621281dae1133f716823da4b0720e3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
refs-pull-merge:
runs-on: ubuntu-latest
steps:
- name: checkout v4
uses: actions/checkout@v4
with:
ref: ${{ inputs.branchName }}
- name: checkout opt-in
uses: actions/checkout@main
with:
ref: ${{ inputs.branchName }}
allow-unsafe-pr-checkout: true
- name: expected to fail
uses: actions/checkout@011c9c50dd621281dae1133f716823da4b0720e3
with:
ref: ${{ inputs.branchName }}
pr-json-merge_commit_sha:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ fromJSON(inputs.pullRequestJSON).merge_commit_sha }}
- name: checkout opt-in
uses: actions/checkout@main
with:
persist-credentials: false
ref: ${{ fromJSON(inputs.pullRequestJSON).merge_commit_sha }}
allow-unsafe-pr-checkout: true
- name: expected to fail
uses: actions/checkout@011c9c50dd621281dae1133f716823da4b0720e3
with:
persist-credentials: false
ref: ${{ fromJSON(inputs.pullRequestJSON).merge_commit_sha }}