Skip to content

upgrade-main

upgrade-main #735

Workflow file for this run

# ~~ Generated by projen. To modify, edit .projenrc.ts and run "pnpm exec projen".
name: upgrade-main
on:
workflow_dispatch: {}
schedule:
- cron: 0 0 * * *
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@d23441a48e516b6c34aea4fa41551a30e30af803
with:
ref: main
- name: set up Docker
if: ${{ env.LEAN_BOOTSTRAP != 'true' }}
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
- name: Load docker images
id: docker-cache
if: ${{ env.LEAN_BOOTSTRAP != 'true' }}
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: ~/.docker-images.tar
key: docker-cache-${{ runner.os }}
- name: Restore docker images
if: ${{ env.LEAN_BOOTSTRAP != 'true' && steps.docker-cache.outputs.cache-hit }}
run: docker image load --input ~/.docker-images.tar
- if: ${{ env.LEAN_BOOTSTRAP != 'true' }}
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
with:
go-version: ^1.23.0
- if: ${{ env.LEAN_BOOTSTRAP != 'true' }}
uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7
with:
bun-version: 1.1.26
- if: ${{ env.LEAN_BOOTSTRAP != 'true' }}
uses: opentofu/setup-opentofu@9d84900f3238fab8cd84ce47d658d25dd008be2f
with:
tofu_wrapper: false
tofu_version: 1.8.2
- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
with:
version: 11.5.0
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: 24.12.0
package-manager-cache: false
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Upgrade dependencies
run: pnpm exec 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
if: steps.create_patch.outputs.patch_created
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: repo.patch
path: repo.patch
overwrite: true
env:
LEAN_BOOTSTRAP: "true"
pr:
name: Create Pull Request
needs: upgrade
runs-on: ubuntu-latest
permissions:
contents: read
if: ${{ needs.upgrade.outputs.patch_created }}
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
ref: main
- name: Download patch
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
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[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@5f6978faf089d4d20b00c7766989d076bb2fc7f1
with:
token: ${{ secrets.PROJEN_GITHUB_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"
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