42 lines (42 loc) · 1.34 KB
/
ci.yaml
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
name: CI
on:
pull_request:
workflow_dispatch:
jobs:
# see https://github.com/marketplace/actions/semantic-pull-request
lint-PR:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.6.0
with:
# When using "Squash and merge" on a PR with only one commit, GitHub
# will suggest using that commit message instead of the PR title for the
# merge commit, and it's easy to commit this by mistake. Enable this option
# to also validate the commit message for one commit PRs.
# https://github.com/amannn/action-semantic-pull-request
validateSingleCommit: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check-aws-cdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: ./script/check-aws-cdk
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: npm
- run: ./script/ci
approve-and-merge:
runs-on: ubuntu-latest
needs: [CI]
steps:
- name: Validate, approve and merge release PRs
uses: guardian/actions-merge-release-changes-to-protected-branch@v1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
npm-lockfile-version: 2