-
-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (45 loc) · 1.79 KB
/
yarn_update.yml
File metadata and controls
52 lines (45 loc) · 1.79 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
name: Check for yarn updates
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 5 1 * *'
push:
paths:
- '.github/workflows/yarn_update.yml'
jobs:
yarn-update-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
with:
node-version: 24
- name: Update yarn
id: update-yarn
run: |
OLD_VERSION=$(yarn --version)
yarn set version stable
NEW_VERSION=$(yarn --version)
if [ "${OLD_VERSION}" == "${NEW_VERSION}" ]; then
echo "yarn is already up to date."
else
echo "yarn updated to version ${NEW_VERSION}."
echo "YARN_VERSION=${NEW_VERSION}" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.update-yarn.outputs.YARN_VERSION != ''
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
with:
author: 'Florian Imdahl <git@ffflorian.de>'
committer: 'Florian Imdahl <git@ffflorian.de>'
base: main
body: |
This PR updates yarn to version **${{ steps.update-yarn.outputs.YARN_VERSION }}**.
See the [release notes](https://github.com/yarnpkg/berry/releases/tag/%40yarnpkg%2Fcli%2F${{ steps.update-yarn.outputs.YARN_VERSION }}) for more details.
branch: 'chore/deps/yarn-${{ steps.update-yarn.outputs.YARN_VERSION }}'
commit-message: 'chore(deps): bump yarn to version ${{ steps.update-yarn.outputs.YARN_VERSION }}'
title: 'chore(deps): bump yarn to version ${{ steps.update-yarn.outputs.YARN_VERSION }}'