-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (55 loc) · 1.77 KB
/
continuous-integration.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
name: Continuous Integration
on:
push:
branches: [staging, main]
pull_request:
merge_group:
workflow_call:
inputs:
sha:
description: The commit SHA to run the workflow on
required: false
type: string
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ inputs.sha }}
- name: Add problem matchers
run: |
echo '::add-matcher::.github/problem-matchers/tsc.json'
- name: Build test image
uses: guidojw/actions/build-docker-image@870d7c8de5aeb08420bb88d8fbddb0222a9eac61 # v1.4.0
with:
name: app
lint:
name: Lint
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ inputs.sha }}
- name: Add problem matchers
run: |
echo '::add-matcher::.github/problem-matchers/actionlint.json'
echo '::add-matcher::.github/problem-matchers/eslint-stylish.json'
- name: Download actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.25
- name: Load test image
uses: guidojw/actions/load-docker-image@870d7c8de5aeb08420bb88d8fbddb0222a9eac61 # v1.4.0
with:
name: app
- name: Lint
run: |
EXIT_STATUS=0
./actionlint -ignore 'property "gh_app_private_key" is not defined' -ignore 'SC2153:' -ignore 'SC2087:' || \
EXIT_STATUS=$?
docker run app yarn lint || EXIT_STATUS=$?
exit $EXIT_STATUS