-
-
Notifications
You must be signed in to change notification settings - Fork 24
66 lines (58 loc) · 2.13 KB
/
update-yarn.yaml
File metadata and controls
66 lines (58 loc) · 2.13 KB
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
name: Update Yarn
on:
schedule:
- cron: '0 10 15 * *' # Runs every 15th of the month
workflow_dispatch:
jobs:
open-update-pr:
name: "Open Update PR"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Enable Corepack
run: corepack enable
- name: Get short hash
id: short-sha
run: echo "short=$(openssl rand -hex 6)" >> $GITHUB_OUTPUT
- name: Update yarn in web
working-directory: ./web
run: yarn set version stable
- name: Install yarn in web
working-directory: ./web
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
- name: Update yarn in graphql-server
working-directory: ./graphql-server
run: yarn set version stable
- name: Install yarn in graphql-server
working-directory: ./graphql-server
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
- name: Update yarn in workbench-cypress
working-directory: ./workbench-cypress
run: yarn set version stable
- name: Install yarn in workbench-cypress
working-directory: ./workbench-cypress
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
- name: Create and Push new branch
run: |
git config --global --add user.name "tbantle22"
git config --global --add user.email "taylor@dolthub.com"
branchname=${{ format('update-yarn-{0}', steps.short-sha.outputs.short) }}
git checkout -b "$branchname"
git add .
git commit -m "Update yarn"
git push origin "$branchname"
- name: Create pull request
uses: repo-sync/pull-request@v2
id: latest-pr
with:
source_branch: ${{ format('update-yarn-{0}', steps.short-sha.outputs.short) }}
destination_branch: "main"
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
pr_title: "Update yarn"
pr_assignee: eric-richardson1
pr_label: "dependencies"