actions
actions copied to clipboard
[feature request] create an action that checks for backstage updates
using the backstage-cli
makes updating backstage straightforward and easy, it would be nice to have an action that does that automatically in a periodic manner.
I created a workflow that runs every month to check for new versions and creates a PR with the changes:
name: Update Backstage
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 1 * *'
jobs:
update-backstage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Retrieve node version
id: node-version
run: echo "node=$(cat .node-version)" >> $GITHUB_OUTPUT
- name: install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.node }}
cache: 'npm'
- name: install dependencies
run: npm install --global yarn
- name: yarn install
uses: backstage/actions/[email protected]
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
- name: Update Backstage
run: yarn backstage-cli versions:bump --pattern '@{backstage,roadiehq,k-phoen}/*'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(deps): updates Backstage"
title: "chore(deps): updates Backstage"
branch: chore/update-backstage
body: Please additionally have a look at [upgrade-helper](https://backstage.github.io/upgrade-helper/) tool from Backstage to compare if there is changes to the upstream project and adapt accordingly.
I am willing to submit a pull request here if the maintainers approve.
Cheers
Hey @Rugvip any thoughts on that? :)