Skip to content

πŸ”— Update Dependencies Main #7

πŸ”— Update Dependencies Main

πŸ”— Update Dependencies Main #7

name: " πŸ”— Update Dependencies Main"
on:
push:
branches:
- main
paths:
- "**/package.json"
- "**/pnpm-lock.yaml"
- "scripts/**"
workflow_dispatch:
schedule:
- cron: "0 12 * * 0"
permissions:
contents: read
jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest
env:
NEW_BRANCH: "update-dependencies-main"
REF_BRANCH: main
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ env.REF_BRANCH }}
- name: Setup
uses: ./.github/actions/setup
- name: Update
run: |
pnpm -r up
- name: Install
run: |
pnpm i
# Catch any new dictionaries and add them to the config.
- name: Update Release-Please packages
run: ./scripts/gen-release-please-config.sh
- name: Lint
run: |
pnpm lint
- name: Has changes
run: |
git --no-pager diff --compact-summary --exit-code && echo "git_status=clean" >> $GITHUB_ENV || echo "git_status=dirty" >> $GITHUB_ENV
git --no-pager diff --compact-summary
- name: Gen Body
run: |
echo 'git_body<<DIFF' >> $GITHUB_ENV
git --no-pager diff --compact-summary >> $GITHUB_ENV
echo 'DIFF' >> $GITHUB_ENV
- name: Echo git_status
run: echo ${{ env.git_status }}
- uses: tibdex/[email protected] # cspell:ignore tibdex
if: env.git_status == 'dirty'
id: generate-token
with:
app_id: ${{ secrets.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
- name: Create Pull Request
if: env.git_status == 'dirty'
uses: peter-evans/create-pull-request@v5
with:
commit-message: "ci: Workflow Bot -- Update ALL Dependencies"
branch: ${{ env.NEW_BRANCH }}
base: ${{ env.REF_BRANCH }}
title: "ci: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})"
token: ${{ steps.generate-token.outputs.token }}
body: ${{ env.git_body }}
delete-branch: true