-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (61 loc) · 1.92 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
name: build-docker-image
on:
push:
paths:
- 'test/**'
- 'scripts/**'
- 'bin/**'
- 'src/**'
- 'src/**'
- 'yarn.lock'
- 'Dockerfile'
branches:
- '!*'
- 'develop'
- 'stage'
- 'master'
env:
GH_PAT: ${{ secrets.GH_PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: true
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: styfle/[email protected]
with:
workflow_id: build-docker.yml
access_token: ${{ github.token }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 30
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: General
run: |
# comment
GIT_BRANCH=${{ github.ref }}
echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_ENV
echo "GIT_BRANCH=$(echo "${GIT_BRANCH/refs\/heads\//}")" >> $GITHUB_ENV
echo "COMMIT_DATE=$(git log -n 1 --pretty='format:%cd' --date=format:'%y-%m-%d')" >> $GITHUB_ENV
echo "GH_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV
git config --global url."https://${{ env.GH_PAT }}:[email protected]/".insteadOf "https://github.com/"
git config --global url."https://${{ env.GH_PAT }}:[email protected]/".insteadOf "ssh://[email protected]/"
- uses: bahmutov/npm-install@v1
with:
install-command: yarn --frozen-lockfile --silent
# pdftotext -> ubuntu
# mac -> poppler
- name: install deps
run: |
sudo apt update
sudo apt install poppler-utils antiword unrtf tesseract-ocr libtesseract-dev -y
- name: build
run: |
yarn build
- name: Test
run: |
yarn test && yarn lint