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

Enhance CI Workflow: Check for Version Bump and appVersion Changes #44

Merged

Conversation

Fovty
Copy link
Member

@Fovty Fovty commented Sep 11, 2024

Motivation

This change improves the existing CI workflow by adding a check for both version bumps and changes to the appVersion in the Chart.yaml. It aims to ensure that any changes to key versioning information are caught and flagged during the pull request process, providing maintainers the ability to block merges if necessary.

Changes

  • Added logic to check for differences in appVersion between the PR and the main branch.
  • The PR will be blocked if an appVersion change is detected.
  • Added a condition to skip the workflow if the release label is applied.
  • The workflow triggers on pull request events (opened, synchronize, labeled).

Tests done

  • Verified that the workflow properly detects version changes in Chart.yaml.
  • Tested the condition to skip the workflow based on the release label.
  • Tested the Git diff functionality to detect changes in appVersion field.
  • Ensured the workflow triggers correctly on PR events like opened, synchronize, and labeled.

TODO

  • Ensure that the branch protection rules for the main branch enforce the Version Bump Check status check.

  • The workflow requires write access to contents and pull requests to set statuses and post comments. Make sure the following permissions are enabled for GitHub Actions:

    • Contents: write
    • Pull Requests: write
  • I've assigned myself to this PR

@Fovty Fovty added the enhancement New feature or request label Sep 11, 2024
@Fovty Fovty self-assigned this Sep 11, 2024
@jonathan-mayer jonathan-mayer linked an issue Sep 12, 2024 that may be closed by this pull request
Copy link
Member

@jonathan-mayer jonathan-mayer left a comment

Choose a reason for hiding this comment

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

Just some naming, maybe @JTaeuber will find something but the rest looks good to me

.github/workflows/check-version-bump.yml Outdated Show resolved Hide resolved
.github/workflows/check-version-bump.yml Outdated Show resolved Hide resolved
.github/workflows/check-version-bump.yml Outdated Show resolved Hide resolved
Copy link
Member

@jonathan-mayer jonathan-mayer left a comment

Choose a reason for hiding this comment

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

LGTM, lets have @JTaeuber have a look over it

Copy link
Member

@JTaeuber JTaeuber left a comment

Choose a reason for hiding this comment

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

I will change the rest on my branch. Other than that it looks good.

@JTaeuber JTaeuber merged commit 7ba5df9 into caas-team:feat/RefactorWorkflows Sep 12, 2024
2 checks passed
jonathan-mayer added a commit that referenced this pull request Sep 16, 2024
* refactor create_release workflow to make automatic release

* add check_version workflow

* refactor doc´ker build

* refactor helm build

* refactor create_release.yaml

* change version to 1.0.0

* fix path ref

* add missing v

* refactor workflows

* Enhance CI Workflow: Check for Version Bump and appVersion Changes (#44)

* feat: additional approval on Version change

* fix: combine version bump check and approve by label

* fix: adjust label name

* fix: remove tag comparison

* fix: base_ref

* fix: some naming changes

* Fix syntax

Co-authored-by: Jonathan Mayer <[email protected]>

* refactor check-for-release.yaml

* fix dependency

* resolve merge conflicts

* add label removing

* chore: syntax

* change message

* removed not needed if checks

* removal of new release

---------

Co-authored-by: Johannes <[email protected]>
Co-authored-by: Jonathan Mayer <[email protected]>
jonathan-mayer added a commit that referenced this pull request Sep 16, 2024
* refactor create_release workflow to make automatic release

* add check_version workflow

* refactor doc´ker build

* refactor helm build

* refactor create_release.yaml

* change version to 1.0.0

* fix path ref

* add missing v

* refactor workflows

* Enhance CI Workflow: Check for Version Bump and appVersion Changes (#44)

* feat: additional approval on Version change

* fix: combine version bump check and approve by label

* fix: adjust label name

* fix: remove tag comparison

* fix: base_ref

* fix: some naming changes

* Fix syntax

Co-authored-by: Jonathan Mayer <[email protected]>

* refactor check-for-release.yaml

* fix dependency

* resolve merge conflicts

* add label removing

* chore: syntax

* change message

* removed not needed if checks

* removal of new release

* fix errors in workflows

---------

Co-authored-by: Johannes <[email protected]>
Co-authored-by: Jonathan Mayer <[email protected]>
jonathan-mayer added a commit that referenced this pull request Sep 16, 2024
* refactor create_release workflow to make automatic release

* add check_version workflow

* refactor doc´ker build

* refactor helm build

* refactor create_release.yaml

* change version to 1.0.0

* fix path ref

* add missing v

* refactor workflows

* Enhance CI Workflow: Check for Version Bump and appVersion Changes (#44)

* feat: additional approval on Version change

* fix: combine version bump check and approve by label

* fix: adjust label name

* fix: remove tag comparison

* fix: base_ref

* fix: some naming changes

* Fix syntax

Co-authored-by: Jonathan Mayer <[email protected]>

* refactor check-for-release.yaml

* fix dependency

* resolve merge conflicts

* add label removing

* chore: syntax

* change message

* removed not needed if checks

* removal of new release

* fix errors in workflows

* fix appVersion variable mismatch

---------

Co-authored-by: Johannes <[email protected]>
Co-authored-by: Jonathan Mayer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send message in PR when merging would create release
3 participants