Skip to content
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

Add CNB update workflow #27

Merged
merged 5 commits into from
Dec 11, 2024
Merged

Add CNB update workflow #27

merged 5 commits into from
Dec 11, 2024

Conversation

runesoerensen
Copy link
Contributor

@runesoerensen runesoerensen commented Dec 11, 2024

This workflow automates the process of keeping the DOTNET_CNB_VERSION in bin/compile and the CHANGELOG.md file up-to-date with new releases in the heroku/buildpacks-dotnet repository:

  1. Extracts the currently pinned DOTNET_CNB_VERSION from bin/compile.
  2. Queries the heroku/buildpacks-dotnet repository to find the next release following the currently pinned version.
  3. Updates files in this repository:
    • Updates bin/compile to use the next CNB release.
    • Inserts the relevant release notes from the heroku/buildpacks-dotnet repository under the ## [Unreleased] section of CHANGELOG.md.
  4. Creates a PR titled Update heroku/buildpacks-dotnet to v{next-cnb-release-version} with a link to the corresponding release.

The workflow is executed on a schedule, but can also be triggered manually to allow multiple CNB version updates prior to executing the "Prepare Release" workflow.

Testing this type of workflow is a bit tricky, but should work fine for common/regular version updates. There are several areas we may want to improve in the future, such as automatically triggering this workflow following successful execution of https://github.com/heroku/buildpacks-dotnet/blob/main/.github/workflows/release.yml.

Maintainers may need to edit CHANGELOG.md manually (particularly to remove entries that are not relevant for this buildpack, e.g. changes to caching logic etc).

@runesoerensen runesoerensen force-pushed the add-update-cnb-workflow branch 2 times, most recently from 58e58ea to ebe7418 Compare December 11, 2024 04:57
@runesoerensen runesoerensen force-pushed the add-update-cnb-workflow branch from ebe7418 to b497a25 Compare December 11, 2024 05:00
@runesoerensen runesoerensen marked this pull request as ready for review December 11, 2024 05:19
@runesoerensen runesoerensen requested a review from a team as a code owner December 11, 2024 05:19
Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yey automation! 😄

.github/workflows/cnb.yml Outdated Show resolved Hide resolved
.github/workflows/cnb.yml Show resolved Hide resolved
.github/workflows/cnb.yml Outdated Show resolved Hide resolved
.github/workflows/cnb.yml Show resolved Hide resolved
@runesoerensen runesoerensen merged commit af4b6c2 into main Dec 11, 2024
5 checks passed
@runesoerensen runesoerensen deleted the add-update-cnb-workflow branch December 11, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants