ci: Update ALL Dependencies (main) -- Workflow Bot (#642) #168
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" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: Reference Branch | |
default: main | |
required: false | |
schedule: | |
- cron: "0 12 * * 0" | |
jobs: | |
update-dependencies: | |
if: github.repository_owner == 'streetsidesoftware' | |
runs-on: ubuntu-latest | |
env: | |
NEW_BRANCH: "update-dependencies-${{ inputs.ref || 'main' }}" | |
REF_BRANCH: ${{ inputs.ref || 'main' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.REF_BRANCH }} | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Update | |
run: | | |
npm install | |
npm run update-packages | |
- name: Gen Diff | |
run: | | |
echo "git_diff<<DIFF" >> $GITHUB_ENV | |
git --no-pager diff package.json >> $GITHUB_ENV | |
echo "DIFF" >> $GITHUB_ENV | |
- name: Gen Diff Summary | |
run: | | |
echo "git_summary<<DIFF" >> $GITHUB_ENV | |
git --no-pager diff --stat >> $GITHUB_ENV | |
echo "DIFF" >> $GITHUB_ENV | |
- name: Gen Body | |
id: gen-body | |
uses: streetsidesoftware/actions/public/output@v1 | |
with: | |
value: | | |
### Workflow Bot -- Update ALL Dependencies | |
#### `package.json` | |
```diff | |
${{ env.git_diff }} | |
``` | |
#### Summary | |
${{ env.git_summary }} | |
- name: PR | |
uses: streetsidesoftware/actions/.github/actions/pr@v1 | |
with: | |
commit-message: "ci: Update ALL Dependencies -- Workflow Bot" | |
branch: ${{ env.NEW_BRANCH }} | |
base: ${{ env.REF_BRANCH }} | |
title: "ci: Update ALL Dependencies (${{ env.REF_BRANCH }}) -- Workflow Bot" | |
body: ${{ steps.gen-body.outputs.value }} | |
app_id: ${{ secrets.AUTOMATION_APP_ID }} | |
app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }} |