Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wanisfahmyDE opened this issue Apr 5, 2023 · 1 comment

Comments

@wanisfahmyDE
Copy link
Contributor

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

@wanisfahmyDE
Copy link
Contributor Author

Hey @Rugvip any thoughts on that? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant