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

Move to automated version release when intended #12

Merged
merged 1 commit into from
May 20, 2024

Conversation

EmbeddedDevops1
Copy link
Collaborator

@EmbeddedDevops1 EmbeddedDevops1 commented May 20, 2024

User description

Changes to version.txt trigger the release job. Closes #11.


PR Type

enhancement, configuration changes


Description

  • Replaced the version check job with a change detection job for version.txt to automate the release process.
  • Updated the GitHub Actions checkout version to v3 for better performance and features.
  • Integrated dorny/paths-filter to detect changes specifically in version.txt.
  • Modified the release job to trigger only if there are changes in version.txt, ensuring intentional version increments.

Changes walkthrough 📝

Relevant files
Enhancement
ci_pipeline.yml
Automate release process based on changes to version.txt 

.github/workflows/ci_pipeline.yml

  • Replaced version check job with a change detection job for
    version.txt.
  • Updated GitHub Actions checkout version to v3.
  • Added dorny/paths-filter to detect changes in version.txt.
  • Modified release job to depend on the change detection job.
  • +12/-20 

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @EmbeddedDevops1 EmbeddedDevops1 linked an issue May 20, 2024 that may be closed by this pull request
    Copy link
    Contributor

    PR Description updated to latest commit (9fbb123)

    Copy link
    Contributor

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are mostly configuration updates in the CI pipeline, which are straightforward and well-documented. The PR modifies existing jobs and integrates a new action for path filtering, which is a common task and should not require extensive review time.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Possible Oversight: The PR removes the explicit version increment check that was previously in place. This could potentially lead to scenarios where the version is not incremented correctly but the release still proceeds if the file version.txt is modified without a proper version update.

    🔒 Security concerns

    No

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Ensure the workflow fails if the dorny/paths-filter step encounters an error

    Add a continue-on-error: false property to the dorny/paths-filter step to ensure the
    workflow fails if this step encounters an error.

    .github/workflows/ci_pipeline.yml [19-20]

     - uses: dorny/paths-filter@v2
       id: filter
    +  continue-on-error: false
     
    Suggestion importance[1-10]: 7

    Why: Adding continue-on-error: false ensures that errors in critical steps are not ignored, which is important for workflow reliability. This suggestion correctly targets the newly added step in the PR.

    7
    Enhancement
    Add a name to the dorny/paths-filter step for better readability

    Add a name property to the dorny/paths-filter step for better readability and easier
    debugging.

    .github/workflows/ci_pipeline.yml [19-20]

    -- uses: dorny/paths-filter@v2
    +- name: Filter paths for version changes
    +  uses: dorny/paths-filter@v2
       id: filter
     
    Suggestion importance[1-10]: 5

    Why: Adding a name to the step enhances readability and debugging, which is a good practice. The suggestion correctly targets the newly added step in the PR.

    5
    Add a name to the actions/checkout step for better readability

    Add a name property to the actions/checkout step for better readability and easier
    debugging.

    .github/workflows/ci_pipeline.yml [18]

    -- uses: actions/checkout@v3
    +- name: Checkout repository
    +  uses: actions/checkout@v3
     
    Suggestion importance[1-10]: 5

    Why: Naming steps improves readability and debugging. The suggestion correctly targets the newly added actions/checkout@v3 step at line 18 in the PR.

    5

    @EmbeddedDevops1
    Copy link
    Collaborator Author

    I have tested this release process in a new repo:

    The expected behavior was observed in both PRs.

    @EmbeddedDevops1 EmbeddedDevops1 merged commit eaabe76 into main May 20, 2024
    6 checks passed
    @EmbeddedDevops1 EmbeddedDevops1 deleted the 11-update-versioning-scheme-to-be-intentional branch May 20, 2024 17:33
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    Update versioning scheme to be intentional
    2 participants