Skip to content

fix: brought back the original script #301

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

Merged
merged 1 commit into from
Apr 4, 2025
Merged

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Apr 4, 2025

  • extended to allow manual run

Found https://github.com./orgs/community/discussions/116660 which showed the exact error I was getting with actions/publish-action.

Pull Request

Proposed Changes

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance or breaking

- [x] extended to allow manual run

Found https://github.com./orgs/community/discussions/116660 which showed the _exact_ error I was getting
with actions/publish-action.

Signed-off-by: jmeridth <[email protected]>
@jmeridth jmeridth self-assigned this Apr 4, 2025
@Copilot Copilot AI review requested due to automatic review settings April 4, 2025 05:57
@jmeridth jmeridth requested a review from a team as a code owner April 4, 2025 05:57
@jmeridth jmeridth merged commit 67cff13 into main Apr 4, 2025
9 checks passed
@github-actions github-actions bot added the fix label Apr 4, 2025
@jmeridth jmeridth deleted the jm_bye_bye_publish_action branch April 4, 2025 05:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the GitHub Actions workflow for updating the major tag by restoring the original script behavior and extending functionality to allow manual execution.

  • Updated the event trigger from "released" to "published" for better alignment with the triggering event.
  • Modified the TAG_NAME environment variable fallback to use github.ref when not provided via input.
  • Added steps to check out the repository, extract the version information, and force-update the major tag.
Comments suppressed due to low confidence (1)

.github/workflows/major-version-updater.yml:4

  • Changing the event trigger type from 'released' to 'published' could affect the workflow's intended behavior. Please confirm that this change aligns with the intended trigger conditions for releasing tags.
types: [published]

Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more

workflow_dispatch:
inputs:
TAG_NAME:
description: "Tag name that the major tag will point to (e.g. v1.2.3)"
required: true
env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.ref}}
Copy link
Preview

Copilot AI Apr 4, 2025

Choose a reason for hiding this comment

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

Using github.ref as a fallback for TAG_NAME may lead to unexpected behavior if the reference is not a tag. Consider verifying that the fallback value is always a tag.

Suggested change
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.ref}}
TAG_NAME: ${{ github.event.inputs.TAG_NAME || (github.ref.startsWith('refs/tags/') && github.ref) || '' }}

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

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.

1 participant