-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (43 loc) · 1.5 KB
/
sync-upstream.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
name: sync-upstream
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * *"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Cache ~/.pnpm-store
uses: actions/cache@v3
env:
cache-name: cache-pnpm-store
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.node-version }}-release-
${{ runner.os }}-
- run: npm i -g pnpm
- run: pnpm i
- id: echo_remixicon_bump
run: echo | pnpm run echo-remixicon-bump | grep bump= >> "$GITHUB_OUTPUT"
- if: ${{ steps.echo_remixicon_bump.outputs.bump == 1}}
run: pnpm up remixicon@latest
- if: ${{ steps.echo_remixicon_bump.outputs.bump == 1}}
id: echo_remixicon_version
run: echo | pnpm run echo-remixicon-version | grep version= >> "$GITHUB_OUTPUT"
- name: commit
uses: EndBug/add-and-commit@v9
with:
message: "feat(upstream): auto sync remixicon to ${{ steps.echo_remixicon_version.outputs.version}}"
add: "package.json pnpm-lock.yaml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}