generated from itk-dev/itk-base-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.55 KB
/
pr.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
on: pull_request
name: Review
jobs:
changelog:
runs-on: ubuntu-latest
name: Changelog should be updated
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git fetch
run: git fetch
- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
audit:
name: audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: npm audit
run: npm audit
run-code-blocks-from-readme:
runs-on: ubuntu-latest
strategy:
matrix:
blocks:
- development-install prettier-check
- development-install markdown-check
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
# https://github.com/actions/setup-go
- uses: actions/setup-go@v5
with:
go-version: '1.23.0'
# https://github.com/mikkelricky/markdown-code-runner
# We need to run as root in GitHub Actions, hence the `--substitutions` hack!
- run: |
docker network create frontend
go run github.com/mikkelricky/markdown-code-runner@latest run \
--verbose --echo '👉 ' \
--substitutions '{"docker run ": "docker run --user root ", "docker compose run ": "docker compose run --user root "}' \
${{ matrix.blocks }}