-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.65 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
name: pull request
on:
pull_request:
types: [opened, reopened, review_requested, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
# 最初にworkflowファイル全体をチェックする
check-workflows:
permissions:
contents: read
uses: ./.github/workflows/check-workflows.yml
# workflowファイル全体のチェックが終わったら、テストを実行する
test:
needs: check-workflows
permissions:
contents: read
secrets: inherit
uses: ./.github/workflows/test.yml
# cdk diffの結果をコメントする
# このリポジトリとAWS環境のOpen ID Connect等による接続が確立したらコメントを外すと良い
cdk-diff-comment:
needs: check-workflows
if: github.actor != 'dependabot[bot]'
permissions:
id-token: write
contents: write
pull-requests: write
secrets: inherit
uses: ./.github/workflows/post-cdk-diff.yml
# サーバアプリケーションのビルドとテストを実行する
test-server-app:
needs: check-workflows
permissions:
contents: read
uses: ./.github/workflows/server-app.yml
# dependabotが作成したPull Requestを自動マージする
auto-merge-dependabot-pr:
needs: check-workflows
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: gh pr merge "${GITHUB_HEAD_REF}" --merge --squash --auto