Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/workflows/update-dependencies-old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: ' 🔗 Update Dependencies - old'

on:
workflow_dispatch:
inputs:
updateSnapshots:
description: 'Update Integration Test snapshots (yes/no)'
type: choice
options:
- 'yes'
- 'no'
default: 'no'
required: true

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
NEW_BRANCH: 'update-dependencies-main'
REF_BRANCH: main
patch_path: patch.diff
patch_artifact: patch

jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest

outputs:
patch_artifact: ${{ env.patch_artifact }}
patch_path: ${{ env.patch_path }}
base: ${{ env.REF_BRANCH }}
body: |
## Update ALL Dependencies (${{ env.REF_BRANCH }})
commit-message: 'ci: Workflow Bot -- Update ALL Dependencies'
branch: ${{ env.NEW_BRANCH }}
title: 'ci: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})'

env:
UPDATE_SNAPSHOTS: ${{ github.event.inputs.updateSnapshots == 'yes' || github.event.inputs.updateSnapshots == 'y' }}

steps:
- name: Start
run: |
echo "${{ toJson(github.event.inputs) }}"
echo "Update Snapshots: $UPDATE_SNAPSHOTS"
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ env.REF_BRANCH }}

- name: Setup Node and Pnpm
uses: ./.github/actions/setup-node

- name: Update Root
run: |
pnpm up
pnpm -r up

- name: Install
run: pnpm install

- name: Update Yarn
run: |
pnpm run update-yarn

- 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: Build
if: (env.UPDATE_SNAPSHOTS == 'true' || env.git_status == 'dirty')
run: |
pnpm run build

- name: Apply and new Lint rules
if: env.git_status == 'dirty'
continue-on-error: true
run: pnpm run lint

- name: Update Integration Test Snapshots
if: env.UPDATE_SNAPSHOTS == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm run update-integration-snapshots

- name: Build Patch
run: |
mkdir temp || echo temp already exists
git add .
git diff HEAD > temp/${{ env.patch_path }}

- name: Store Patch
uses: actions/upload-artifact@v5
with:
name: ${{ env.patch_artifact }}
path: temp/${{ env.patch_path }}
retention-days: 1

pr:
uses: ./.github/workflows/reuseable-pr-from-artifact.yml
needs:
- update-dependencies
with:
patch_artifact: ${{ needs.update-dependencies.outputs.patch_artifact }}
patch_path: ${{ needs.update-dependencies.outputs.patch_path }}
base: ${{ needs.update-dependencies.outputs.base }}
body: ${{ needs.update-dependencies.outputs.body }}
commit-message: ${{ needs.update-dependencies.outputs.commit-message }}
branch: ${{ needs.update-dependencies.outputs.branch }}
title: ${{ needs.update-dependencies.outputs.title }}
secrets:
app_id: ${{ secrets.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
117 changes: 41 additions & 76 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,9 @@ on:
paths:
- '**/package.json'
- '*-lock.yaml'

workflow_dispatch:
inputs:
updateSnapshots:
description: 'Update Integration Test snapshots (yes/no)'
type: choice
options:
- 'yes'
- 'no'
default: 'no'
required: true
schedule:
- cron: '0 12 * * 0'
workflow_dispatch:

permissions:
contents: read
Expand All @@ -31,32 +21,13 @@ concurrency:
env:
NEW_BRANCH: 'update-dependencies-main'
REF_BRANCH: main
patch_path: patch.diff
patch_artifact: patch

jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest

outputs:
patch_artifact: ${{ env.patch_artifact }}
patch_path: ${{ env.patch_path }}
base: ${{ env.REF_BRANCH }}
body: |
## Update ALL Dependencies (${{ env.REF_BRANCH }})
commit-message: 'ci: Workflow Bot -- Update ALL Dependencies'
branch: ${{ env.NEW_BRANCH }}
title: 'ci: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})'

env:
UPDATE_SNAPSHOTS: ${{ github.event.inputs.updateSnapshots == 'yes' || github.event.inputs.updateSnapshots == 'y' }}

steps:
- name: Start
run: |
echo "${{ toJson(github.event.inputs) }}"
echo "Update Snapshots: $UPDATE_SNAPSHOTS"
- name: Checkout code
uses: actions/checkout@v5
with:
Expand All @@ -71,59 +42,53 @@ jobs:
pnpm -r up

- name: Install
run: pnpm install

- name: Update Yarn
run: |
pnpm run update-yarn

- 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: Build
if: (env.UPDATE_SNAPSHOTS == 'true' || env.git_status == 'dirty')
run: |
pnpm run build
pnpm ib

- name: Apply and new Lint rules
if: env.git_status == 'dirty'
continue-on-error: true
run: pnpm run lint

- name: Update Integration Test Snapshots
if: env.UPDATE_SNAPSHOTS == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm run update-integration-snapshots
- name: PR
uses: ./.github/actions/pr
with:
commit-message: 'ci: Workflow Bot -- Update ALL Dependencies'
branch: ${{ env.NEW_BRANCH }}
app_id: ${{ secrets.AUTOMATION_APP_ID }}
app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
base: ${{ env.REF_BRANCH }}
body: |
## Update ALL Dependencies (${{ env.REF_BRANCH }})
title: 'ci: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})'

update-yarn:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ env.REF_BRANCH }}

- name: Build Patch
- name: Setup Node and Pnpm
uses: ./.github/actions/setup-node

- name: Install
run: pnpm install

- name: Update Yarn
run: |
mkdir temp || echo temp already exists
git add .
git diff HEAD > temp/${{ env.patch_path }}
pnpm run update-yarn

- name: Store Patch
uses: actions/upload-artifact@v5
- name: PR
uses: ./.github/actions/pr
with:
name: ${{ env.patch_artifact }}
path: temp/${{ env.patch_path }}
retention-days: 1

pr:
uses: ./.github/workflows/reuseable-pr-from-artifact.yml
needs:
- update-dependencies
with:
patch_artifact: ${{ needs.update-dependencies.outputs.patch_artifact }}
patch_path: ${{ needs.update-dependencies.outputs.patch_path }}
base: ${{ needs.update-dependencies.outputs.base }}
body: ${{ needs.update-dependencies.outputs.body }}
commit-message: ${{ needs.update-dependencies.outputs.commit-message }}
branch: ${{ needs.update-dependencies.outputs.branch }}
title: ${{ needs.update-dependencies.outputs.title }}
secrets:
app_id: ${{ secrets.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
commit-message: 'ci: Workflow Bot -- Update Yarn'
branch: 'update-yarn-main'
app_id: ${{ secrets.AUTOMATION_APP_ID }}
app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
base: ${{ env.REF_BRANCH }}
body: |
## Update Yarn (${{ env.REF_BRANCH }})
title: 'ci: Workflow Bot -- Update Yarn (${{ env.REF_BRANCH }})'
Loading