-
Notifications
You must be signed in to change notification settings - Fork 22
35 lines (28 loc) · 952 Bytes
/
checks.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
# Run some code checks with GitHub Actions.
name: Code checks
on:
push:
branches:
- "main"
pull_request:
pull_request_target:
permissions:
contents: read
# Allow 1Password/check-signed-commits-action to leave comments on
# pull requests.
pull-requests: write
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v3
with:
fetch-depth: 0 # since we need to diff against origin/main.
# https://github.com/marketplace/actions/check-signed-commits-in-pr
# runs on pull_request_target and pull_request events, but
# pull_request_target is preferred because of the ability to
# leave comments on external PRs created from forks.
- name: Check that commits are signed
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: 1Password/check-signed-commits-action@v1