Skip to content

Commit

Permalink
Add workflow to automatically upgrade cdkVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Srebniak committed Jan 17, 2024
1 parent dcf40d0 commit 09e899c
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/upgrade-cdk-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
workflow_dispatch: {}
schedule:
- cron: 0 2 * * *
push:
branches:
- "workflow-upgrade-projenrc"
jobs:
upgrade:
name: Upgrade
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -68,29 +64,28 @@ 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].
[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*
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 <[email protected]>
committer: github-actions <[email protected]>
signoff: true

0 comments on commit 09e899c

Please sign in to comment.