-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (84 loc) · 2.4 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn lint
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: yarn
- name: Rebuild the dist/ directory
run: yarn build
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
patcher-report-dev:
runs-on: ubuntu-latest
outputs:
spec: ${{ steps.run-report.outputs.spec }}
steps:
- uses: actions/checkout@v4
- name: Patcher
id: run-report
uses: ./
with:
github_token: ${{ secrets.CI_READONLY_READ_TOKEN }}
patcher_command: report
working_dir: infrastructure-live
spec_file: spec.json
include_dirs: "{*dev*}/**"
- uses: actions/upload-artifact@v4
with:
name: spec-file
path: spec.json
patcher-update-dev:
# Runs patcher update against each dependency for the specified accounts in dry run mode.
needs: [patcher-report-dev]
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 2
matrix:
include: ${{ fromJson(needs.patcher-report-dev.outputs.spec).Dependencies }}
steps:
- uses: actions/checkout@v4
- name: Load spec file
uses: actions/download-artifact@v4
with:
name: spec-file
- name: Patcher
id: run-update
uses: ./
with:
github_token: ${{ secrets.CI_READONLY_READ_TOKEN }}
patcher_command: update
working_dir: infrastructure-live
spec_file: spec.json
pull_request_title: "[Patcher] [dev] Update ${{ matrix.ID }}"
pull_request_branch: "patcher-dev-updates-${{ matrix.ID }}"
dependency: ${{ matrix.ID }}
dry_run: true