-
-
Notifications
You must be signed in to change notification settings - Fork 228
105 lines (92 loc) · 2.97 KB
/
pull_request.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Pull Request 📥
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
on:
pull_request_target:
paths-ignore:
- '**/*.md'
merge_group:
jobs:
compose-comment:
name: Compose PR comment ✍️
if: ${{ always() && !cancelled() }}
uses: ./.github/workflows/__job_messages.yml
with:
commit: ${{ github.event.pull_request.head.sha }}
commenting_workflow_run_id: ${{ github.run_id }}
in_progress: true
push-comment:
name: Push comment to PR 🔼
if: ${{ always() && !cancelled() && needs.compose-comment.result == 'success' }}
runs-on: ubuntu-latest
needs:
- compose-comment
steps:
- name: Comment Pull Request
uses: thollander/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
message: ${{ needs.compose-comment.outputs.msg }}
comment_tag: ${{ needs.compose-comment.outputs.marker }}
project:
name: Add to project board 📊
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- uses: alex-page/[email protected]
with:
project: Ongoing development
column: In progress
repo-token: ${{ secrets.JF_BOT_TOKEN }}
label:
name: Labeling 🏷️
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Label depending on modified files
uses: actions/[email protected]
with:
repo-token: ${{ secrets.JF_BOT_TOKEN }}
build:
name: Build 🏗️
uses: ./.github/workflows/__package.yml
# Start build after the comment is created
needs:
- push-comment
# Needed for attestation publication
permissions:
id-token: write
attestations: write
with:
commit: ${{ github.event.pull_request.head.sha }}
quality_checks:
name: Quality checks 👌🧪
uses: ./.github/workflows/__quality_checks.yml
permissions: {}
with:
commit: ${{ github.event.pull_request.head.sha }}
codeql:
name: GitHub CodeQL 🔬
uses: ./.github/workflows/__codeql.yml
permissions:
actions: read
contents: read
security-events: write
with:
commit: ${{ github.event.pull_request.head.sha }}
deploy:
name: Deploy 🚀
uses: ./.github/workflows/__deploy.yml
needs:
- build
permissions:
contents: read
deployments: write
secrets: inherit
with:
# If the PR is from the master branch of a fork, append the fork's name to the branch name
branch: ${{ github.event.pull_request.head.repo.full_name != github.repository && github.event.pull_request.head.ref == 'master' && format('{0}/{1}', github.event.pull_request.head.repo.full_name, github.event.pull_request.head.ref) || github.event.pull_request.head.ref }}
comment: true
pr_number: ${{ github.event.pull_request.number }}
commit: ${{ github.event.pull_request.head.sha }}