-
-
Notifications
You must be signed in to change notification settings - Fork 9
87 lines (73 loc) · 2.2 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: " 🔗 Update Dependencies Main"
on:
workflow_dispatch:
inputs:
base:
description: The Base Ref to apply the diff
required: false
default: "main"
push:
branches:
- main
paths:
- "**/package.json"
- "**/package-lock.json"
schedule:
- cron: "0 12 * * 0"
jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest
env:
NEW_BRANCH: update-dependencies-${{ inputs.base || 'main' }}
REF_BRANCH: ${{ inputs.base || 'main' }}
steps:
- name: Start
env:
EVENT_INPUTS: ${{ toJson(github.event.inputs) }}
run: |
echo "$EVENT_INPUTS"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ env.REF_BRANCH }}
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 18.x
- name: Update Root
run: |
npm i
npx npm-check-updates -t semver -u
rm -rf node_modules package-lock.json
- name: Install
run: npm install
- name: Lint Fix
run: |
npm run lint:fix
- name: Git Status
id: git-status
uses: streetsidesoftware/actions/public/dirty@v1
- name: Gen PR Body
id: body
uses: streetsidesoftware/actions/public/pr-body@v1
with:
title: Update Dependencies
path: >-
package.json
- name: Show Summary
uses: streetsidesoftware/actions/public/summary@v1
with:
text: |
${{ steps.body.outputs.body }}
**Status:** ${{ steps.git-status.outputs.isDirty && 'dirty' || 'clean' }}
- name: PR
uses: streetsidesoftware/actions/.github/actions/pr@v1
with:
commit-message: "chore: Workflow Bot -- Update ALL Dependencies"
branch: ${{ env.NEW_BRANCH }}
base: ${{ env.REF_BRANCH }}
title: "chore: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})"
body: ${{ steps.body.outputs.body }}
app_id: ${{ secrets.AUTOMATION_APP_ID }}
app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}