Skip to content

ci: Workflow Bot -- Update ALL Dependencies (#935) #582

ci: Workflow Bot -- Update ALL Dependencies (#935)

ci: Workflow Bot -- Update ALL Dependencies (#935) #582

name: " 🔗 Update Dependencies Main"
on:
push:
branches:
- main
paths:
- "**/package.json"
- "**/package-lock.json"
workflow_dispatch:
schedule:
- cron: "0 12 * * 0"
jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest
env:
NEW_BRANCH: "update-dependencies-main"
REF_BRANCH: main
steps:
- name: Start
run: |
echo "${{ toJson(github.event.inputs) }}"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ env.REF_BRANCH }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: npm
- 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: Update packages
run: |
npm run update-packages
- name: Build
run: |
npm run build
- name: PR Body
id: body
uses: streetsidesoftware/actions/public/pr-body@v1
with:
title: Update Dependencies
path: package.json
- name: PR
uses: streetsidesoftware/actions/.github/actions/pr@v1
with:
commit-message: "ci: Workflow Bot -- Update ALL Dependencies"
branch: ${{ env.NEW_BRANCH }}
base: ${{ env.REF_BRANCH }}
body: ${{ steps.body.outputs.body }}
app_id: ${{ secrets.AUTOMATION_APP_ID }}
app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}