π Update Dependencies Main #584
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |