Skip to content

[feature request] create an action that checks for backstage updates #124

Open
@wanis-fahmy

Description

@wanis-fahmy

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/yarn-install@v0.6.3
        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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions