-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.55 KB
/
github-actions.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
name: "GitHub Actions"
on: [push]
jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read Node.js version
run: echo "nodeVersion=$(cat ./Dockerfile | grep 'FROM node' | head -n 1 | grep -o '[0-9]*\.[0-9]*\.[0-9]*')" >> $GITHUB_OUTPUT
id: nodeVersion
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ steps.nodeVersion.outputs.nodeVersion }}
- uses: actions/cache@v4
with:
path: |
~/.cache
key: ${{ runner.os }}-yarn-${{ github.job }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ github.job }}
${{ runner.os }}-yarn
- name: Setup yarn
run: |
corepack enable
yarn --immutable
- name: Run ESLint
run: yarn workspaces foreach -Apv -j unlimited run lint
typecheck:
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read Node.js version
run: echo "nodeVersion=$(cat ./Dockerfile | grep 'FROM node' | head -n 1 | grep -o '[0-9]*\.[0-9]*\.[0-9]*')" >> $GITHUB_OUTPUT
id: nodeVersion
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ steps.nodeVersion.outputs.nodeVersion }}
- uses: actions/cache@v4
with:
path: |
~/.cache
key: ${{ runner.os }}-yarn-${{ github.job }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ github.job }}
${{ runner.os }}-yarn
- name: Setup yarn
run: |
corepack enable
yarn --immutable
- name: Run TypeScript
run: yarn workspaces foreach -Apv -j unlimited run typecheck
renovate_trigger:
name: Trigger Renovate Run
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- run: |
DEPENDENCY_DASHBOARD_ISSUE_NUMBER="$(gh issue list -R ${{ github.repository }} | grep "Dependency Dashboard" | awk '{print $1}')"
DEPENDENCY_DASHBOARD_BODY="$(gh issue view $DEPENDENCY_DASHBOARD_ISSUE_NUMBER -R ${{ github.repository }} --json body --jq .body | sed 's/- \[ \] <!-- manual job -->/- \[x\] <!-- manual job -->/')"
gh issue edit $DEPENDENCY_DASHBOARD_ISSUE_NUMBER -R ${{ github.repository }} -F <(echo "$DEPENDENCY_DASHBOARD_BODY")
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}