From 09e899c8d7533a7d645a62015fdf6c4cd334a038 Mon Sep 17 00:00:00 2001 From: Piotr Srebniak Date: Wed, 17 Jan 2024 21:32:21 +0100 Subject: [PATCH] Add workflow to automatically upgrade cdkVersion --- .github/workflows/upgrade-cdk-version.yml | 27 +++++++++-------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/upgrade-cdk-version.yml b/.github/workflows/upgrade-cdk-version.yml index b259b9a4..3ee64f9c 100644 --- a/.github/workflows/upgrade-cdk-version.yml +++ b/.github/workflows/upgrade-cdk-version.yml @@ -3,9 +3,6 @@ on: workflow_dispatch: {} schedule: - cron: 0 2 * * * - push: - branches: - - "workflow-upgrade-projenrc" jobs: upgrade: name: Upgrade @@ -17,8 +14,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 -# with: -# ref: main + with: + ref: main - name: Setup Node.js uses: actions/setup-node@v3 - name: Install dependencies @@ -27,7 +24,6 @@ jobs: run: |- CDK_LATEST=$( npm view aws-cdk version ) sed -E -i "s/(\/\* *workflow-upgrade-cdk-version *\*\/ *)'([0-9.]+)'( *\/\* *workflow-upgrade-cdk-version *\*\/)/\1'$CDK_LATEST'\3/g" .projenrc.ts - cat .projenrc.ts - name: Upgrade project run: npx projen - name: Find mutations @@ -51,8 +47,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 -# with: -# ref: main + with: + ref: main - name: Download patch uses: actions/download-artifact@v3 with: @@ -68,10 +64,9 @@ jobs: id: create-pr uses: peter-evans/create-pull-request@v4 with: -# token: ${{ secrets.PROJEN_GITHUB_TOKEN }} - push-to-fork: psrebniak/cdk-appflow + token: ${{ secrets.PROJEN_GITHUB_TOKEN }} commit-message: |- - chore(deps): upgrade cdklabs-projen-project-types + chore(deps): upgrade cdk version Upgrades project dependencies. See details in [workflow run]. @@ -79,18 +74,18 @@ jobs: ------ - *Automatically created by projen via the "upgrade-cdk-version" workflow* + *Automatically created via the "upgrade-cdk-version" workflow* branch: github-actions/upgrade-cdk-version - title: "chore(deps): upgrade cdklabs-projen-project-types" -# labels: auto-approve + title: "chore(deps): upgrade cdk version" + labels: auto-approve body: |- - Upgrades project dependencies. See details in [workflow run]. + Upgrades cdk version. See details in [workflow run]. [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ------ - *Automatically created by projen via the "upgrade-cdk-version" workflow* + *Automatically created via the "upgrade-cdk-version" workflow* author: github-actions committer: github-actions signoff: true