Skip to content

upgrade-cdktf

upgrade-cdktf #1868

Workflow file for this run

# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
name: upgrade-cdktf
on:
schedule:
- cron: 55 */6 * * *
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
upgrade:
name: Upgrade CDKTF
runs-on: ubuntu-latest
permissions:
contents: read
env:
CI: "true"
CHECKPOINT_DISABLE: "1"
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install
run: yarn install
- name: Get current CDKTF version
id: current_version
run: |-
OLD_VERSION=$(npm list cdktf --depth=0 --json | jq -r '.dependencies.cdktf.version')
OLD_VERSION_SHORT=$(cut -d "." -f 2 <<< "$OLD_VERSION")
echo "value=$OLD_VERSION" >> $GITHUB_OUTPUT
echo "short=$OLD_VERSION_SHORT" >> $GITHUB_OUTPUT
- name: Get latest CDKTF version
id: latest_version
run: |-
CDKTF_VERSION=$(yarn info cdktf --json | jq -r '.data.version')
CDKTF_VERSION_SHORT=$(cut -d "." -f 2 <<< "$CDKTF_VERSION")
echo "value=$CDKTF_VERSION" >> $GITHUB_OUTPUT
echo "short=$CDKTF_VERSION_SHORT" >> $GITHUB_OUTPUT
- name: Run upgrade script
if: steps.current_version.outputs.short != steps.latest_version.outputs.short
run: scripts/update-cdktf.sh ${{ steps.latest_version.outputs.value }}
- name: Create draft pull request
if: steps.current_version.outputs.short != steps.latest_version.outputs.short
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
commit-message: "chore!: upgrade to cdktf ${{ steps.latest_version.outputs.value }}"
branch: auto/upgrade-cdktf-${{ steps.latest_version.outputs.short }}
base: main
title: "chore!: upgrade to cdktf ${{ steps.latest_version.outputs.value }}"
body: |-
This PR initiates the upgrade of CDKTF from version `${{ steps.current_version.outputs.value }}` to version `${{ steps.latest_version.outputs.value }}`.
Unfortunately, not everything can be automated, and the following steps need to be completed manually:
- [ ] Update `@cdktf/provider-kubernetes` to a version compatible with `cdktf@${{ steps.latest_version.outputs.value }}` [here](https://github.com/cdktf/cdktf-cdk8s/blob/4d23de9f0dadddb922bf1c44079f08856491f11b/.projenrc.ts#L67). Look up the version [here](https://github.com/cdktf/cdktf-provider-kubernetes/releases/).
- [ ] Run `npx projen`
Please checkout this PR, complete the above steps, push the changes to this branch, and then mark this PR as ready for review to complete the upgrade. Thanks!
labels: automerge,auto-approve,dependencies
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
author: team-tf-cdk <[email protected]>
committer: team-tf-cdk <[email protected]>
signoff: true
delete-branch: true
draft: true