upgrade-main #724
This file contains hidden or 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: upgrade-main | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| - cron: 0 0 * * * | |
| env: | |
| node_version: 22 | |
| jobs: | |
| upgrade: | |
| name: Upgrade | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| patch_created: ${{ steps.create_patch.outputs.patch_created }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: main | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.node_version }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Upgrade dependencies | |
| run: scripts/run-task upgrade | |
| container: | |
| image: jsii/superchain:1-buster-slim-node14 | |
| pr: | |
| name: Create Pull Request | |
| needs: upgrade | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| if: ${{ needs.upgrade.outputs.patch_created }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.PROJEN_GITHUB_TOKEN }} | |
| ref: main | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.node_version }} | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Download patch | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: .repo.patch | |
| path: ${{ runner.temp }} | |
| - name: Apply patch | |
| run: '[ -s ${{ runner.temp }}/.repo.patch ] && git apply ${{ runner.temp }}/.repo.patch || echo "Empty patch. Skipping."' | |
| - name: Set git identity | |
| run: |- | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| - name: Create Pull Request | |
| id: create-pr | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.PROJEN_GITHUB_TOKEN }} | |
| commit-message: |- | |
| chore(deps): upgrade dependencies | |
| Upgrades project dependencies. See details in [workflow run]. | |
| [Workflow Run]: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| ------ | |
| *Automatically created by projen via the "upgrade-main" workflow* | |
| branch: github-actions/upgrade-main | |
| title: 'chore(deps): upgrade dependencies' | |
| body: |- | |
| Upgrades project dependencies. See details in [workflow run]. | |
| [Workflow Run]: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| ------ | |
| *Automatically created by projen via the "upgrade-main" workflow* | |
| author: github-actions <[email protected]> | |
| committer: github-actions <[email protected]> | |
| signoff: true |