Maintenance #208
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: Maintenance | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 12 * * 2" | |
jobs: | |
npm-upgrades: | |
name: Regenerate package-lock.json | |
runs-on: macos-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node JS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 23.1.0 | |
- name: Regenerate package-lock.json | |
run: make -C ui npm-upgrade | |
- name: Rebuild react app | |
run: make -C ui build | |
- name: Update snapshots | |
run: make -C ui update-snapshots | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
author: "Łukasz Mierzwa <[email protected]>" | |
commit-message: "chore(ui): upgrade all 3rd party dependencies" | |
branch: npm-upgrades | |
delete-branch: true | |
title: "chore(ui): upgrade all 3rd party dependencies" | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr merge --merge --auto npm-upgrades | |
env: | |
GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }} |