# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". name: upgrade-main on: workflow_dispatch: {} schedule: - cron: 0 0 * * 1 jobs: upgrade: name: Upgrade runs-on: ubuntu-latest permissions: contents: read outputs: patch_created: ${{ steps.create_patch.outputs.patch_created }} steps: - name: Checkout id: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: ref: main - name: Setup Node.js id: setup_node_js uses: actions/setup-node@v7.1.0 with: node-version: 24.x package-manager-cache: false - name: Install dependencies id: install_dependencies run: npm ci - name: Upgrade dependencies id: upgrade_dependencies run: npx projen upgrade - name: Find mutations id: create_patch run: |- git add . git diff --staged --patch --exit-code > repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT shell: bash working-directory: ./ - name: Upload patch id: upload_patch if: steps.create_patch.outputs.patch_created uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 with: name: repo.patch path: repo.patch overwrite: true pr: name: Create Pull Request needs: upgrade runs-on: ubuntu-latest permissions: contents: read if: ${{ needs.upgrade.outputs.patch_created }} steps: - name: Generate token id: generate_token uses: actions/create-github-app-token@v3.3.0 with: app-id: ${{ secrets.PROJEN_APP_ID }} private-key: ${{ secrets.PROJEN_APP_PRIVATE_KEY }} permission-pull-requests: write permission-contents: write permission-workflows: write - name: Checkout id: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: ref: main - name: Download patch id: download_patch uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 with: name: repo.patch path: ${{ runner.temp }} - name: Apply patch id: apply_patch run: '[ -s ${{ runner.temp }}/repo.patch ] && git apply ${{ runner.temp }}/repo.patch || echo "Empty patch. Skipping."' - name: Set git identity id: set_git_identity run: |- git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Create Pull Request id: create-pr uses: peter-evans/create-pull-request@v8.1.1 with: token: ${{ steps.generate_token.outputs.token }} commit-message: |- chore(deps): upgrade dependencies Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: ${{ github.server_url }}/${{ 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" labels: auto-approve,auto-merge body: |- Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ------ *Automatically created by projen via the "upgrade-main" workflow* author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> signoff: true