-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: automate upgrading CDKTF #222
Conversation
[
|
[
|
[
|
[
|
[
|
[
|
[
|
[
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Not approving because I don't know if Mergify cares about open discussions 😅
.github/workflows/upgrade-cdktf.yml
Outdated
id: latest_version | ||
run: |- | ||
CDKTF_VERSION=$(yarn info cdktf --json | jq -r '.data.version') | ||
CDKTF_VERSION_SHORT=$(cut -d "." -f 2 <<< "$CDKTF_VERSION") |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not just dropping the patch, what it's doing is grabbing the minor version number from the semver, e.g. if the version is 0.18.0
it results in 18
, if the version is 1.6.0
it results in 6
. I renamed the variable to CDKTF_VERSION_MINOR
to be more self-documenting.
This PR upgrades CDKTF to version `${{ needs.check_versions.outputs.latest_version }}` in `cdktf-repository-manager` (this repo). | ||
Unfortunately, not everything can be automated, and the following steps need to be completed manually: | ||
|
||
- [ ] Wait for #${{ needs.upgrade_repos.outputs.pr_id }} to be merged and for the deployment to succeed |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
[
|
[
|
[
|
[
|
I'm going to lock this pull request because it has been closed for at least 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue so we can investigate further. |
This workflow adapts scripts we're using elsewhere already like https://github.com/hashicorp/cdktf-aws-cdk/blob/main/.github/workflows/upgrade-cdktf.yml and https://github.com/hashicorp/terraform-cdk-action/blob/main/.github/workflows/upgrade-cdktf.yml to automatically create a PR to upgrade CDKTF when new (non-patch) versions come out. This variant creates two PRs:
Hopefully this will help prevent situations in the future like we had with this repo not updating its version of CDKTF for 6+ months.