-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
55 lines (47 loc) · 1.64 KB
/
Copy pathsetup.yml
File metadata and controls
55 lines (47 loc) · 1.64 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
name: 🎬 Setup
on:
pull_request:
branches: [dev]
types: [opened, synchronize, reopened, closed]
permissions:
actions: write
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
set-pr-info:
name: set PR info
runs-on: ubuntu-latest
steps:
- name: Save PR info
env:
PR_ID: ${{ github.event.pull_request.number || '' }}
PR_REF: ${{ github.head_ref || github.ref_name }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
PR_STATE: ${{ github.event.pull_request.state || '' }}
run: |
printf '%s\n' "$PR_ID" > ./pr-id.txt
printf '%s\n' "$PR_REF" > ./pr-ref.txt
printf '%s\n' "$PR_REPO" > ./pr-repo.txt
printf '%s\n' "$PR_STATE" > ./pr-state.txt
- name: Upload PR number
uses: actions/upload-artifact@v4
with:
name: pr-id
path: ./pr-id.txt
- name: Upload PR ref
uses: actions/upload-artifact@v4
with:
name: pr-ref
path: ./pr-ref.txt
- name: Upload PR repo
uses: actions/upload-artifact@v4
with:
name: pr-repo
path: ./pr-repo.txt
- name: Upload PR state
uses: actions/upload-artifact@v4
with:
name: pr-state
path: ./pr-state.txt