-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (41 loc) · 1.22 KB
/
refresh.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
name: Refresh components data
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * SUN'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
refresh:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
- id: yarn-cache-dir-path
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn refresh-components-data
env:
GITHUB_PAT: ${{ secrets.X_GITHUB_PAT }}
- uses: peter-evans/create-pull-request@v5
id: cpr
with:
token: ${{ secrets.X_GITHUB_PAT_AUTOMATED }}
author: ${{ secrets.X_GITHUB_AUTOMATED_AUTHOR }}
commit-message: Update components data
delete-branch: true
title: Update components data
labels: |
automated