-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.13 KB
/
maintain-project.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
name: Maintain Project
on:
schedule:
- cron: 5 0 1 * *
workflow_dispatch: null
env:
NODE_VERSION: 20.x
jobs:
maintain-project:
name: Maintain Project
runs-on: ubuntu-latest
steps:
- name: Find yarn cache
id: find-yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: git checkout
uses: actions/checkout@v4
with:
token: ${{secrets.MAINTAIN_GITHUB_TOKEN}}
- name: Configure git credentials
uses: OleksiyRudenko/gha-git-credentials@v2
with:
token: ${{secrets.MAINTAIN_GITHUB_TOKEN}}
- name: Cache yarn dependencies
uses: actions/cache@v4
with:
path: ${{steps.find-yarn-cache.outputs.dir}}
key: ${{runner.os}}-node${{env.NODE_VERSION}}-yarn-${{hashFiles('**/yarn.lock')}}
restore-keys: ${{runner.os}}-node${{env.NODE_VERSION}}-yarn-${{hashFiles('**/yarn.lock')}}
- name: Set up Node.js v${{env.NODE_VERSION}}
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: yarn
- run: yarn maintain-project
- run: git push