-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.06 KB
/
update-dependencies.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
name: "Update dependencies"
on:
workflow_dispatch:
inputs:
force:
description: 'Also create pull request if only developer dependencies changed'
default: 'false'
schedule:
- cron: '37 4 1 * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update dependencies
run: yarn upgrade --latest
- name: Build
run: npm run build
- name: Detect changes in distributed code
if: ${{ github.event.inputs.force != 'true' }}
id: changes
run: |
if [[ $(git status --porcelain ./dist) != "" ]]; then
echo "dist=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: ${{ steps.changes.outputs.dist || github.event.inputs.force == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Update dependencies"
branch: yarn-upgrade-latest
delete-branch: true
title: "Update dependencies"
body: "Automatically created by the 'Update Dependencies' workflow"