-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (73 loc) · 2.31 KB
/
pr-target-dump.yml
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
name: pr target stuff
on:
pull_request_target:
types: [opened, closed, synchronize, reopened]
jobs:
dump:
runs-on: ubuntu-latest
steps:
- shell: pwsh
name: dump
run: |
gci env: | fl
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJSON(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJSON(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJSON(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJSON(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Checkout Base
uses: actions/checkout@v2
continue-on-error: true
with:
ref: ${{ github.event.pull_request.base.sha }}
path: base
- name: Checkout merge commit
uses: actions/checkout@v2
continue-on-error: true
with:
ref: refs/pull/${{ github.event.number }}/merge
path: merge
- name: Checkout merge commit SHA
uses: actions/checkout@v2
continue-on-error: true
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
path: mergesha
- name: Checkout Head
uses: actions/checkout@v2
continue-on-error: true
with:
ref: ${{ github.event.pull_request.head.sha }}
path: head
- name: Delete .git
run: |
rm -rf base/.git
rm -rf merge/.git
rm -rf mergesha/.git
rm -rf head/.git
- name: Hashes
shell: pwsh
run: |
'base [${{ github.event.pull_request.base.sha }}]: ${{ hashFiles('base') }}'
'merge [refs/pull/${{ github.event.number }}/merge]: ${{ hashFiles('merge') }}'
'mergesha [${{ github.event.pull_request.merge_commit_sha }}]: ${{ hashFiles('mergesha') }}'
'head [${{ github.event.pull_request.head.sha }}]: ${{ hashFiles('head') }}'