-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
ci: fix documentation manual dispatch run on tag #10007
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
@@ -61,14 +61,14 @@ jobs: | |||
path: 'out' | |||
|
|||
- name: Extract package and semver from tag | |||
if: ${{ github.ref_type == 'tag' }} | |||
if: ${{ inputs.ref_type && inputs.ref_type == 'tag' || !inputs.ref_type && github.ref_type == 'tag' }} |
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.
Why not simplify these to just?
if: ${{ inputs.ref_type && inputs.ref_type == 'tag' || !inputs.ref_type && github.ref_type == 'tag' }} | |
if: ${{ inputs.ref_type == 'tag' || github.ref_type == 'tag' }} |
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.
Because that would be true if inputs.ref_type
was 'branch' but github.ref_type
was 'tag'. Which is not what we'd want (more prominent in the other way around, since manual workflow runs would seldom be from a tag but a branch).
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.
if you got an easier way to say "if manual run the inputs.ref_type decides what to run, if PR or push the github.ref_type does" I'm all ears.
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.
Because that would be true if
inputs.ref_type
was 'branch' butgithub.ref_type
was 'tag'.
And how is that an issue? inputs
takes priority, since its a manual run, and won't be present on the other possible on
triggers 👀
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.
You could also just extract this in a variable on a separate workflow step, that would probably simplify the logic and also help keep the decision on what to run in one central place
Please describe the changes this PR makes and why it should be merged:
have manual runs of documentation workflow work as expected, emitting .api.json files for the selected tag/branch
Status and versioning classification: