Repository navigation
feat: improve releasing with doc-deploy-changelog action - #1568
Conversation
|
The documentation for this pull request will be available at https://actions.docs.ansys.com/pull/1568. Please allow some time for the documentation to be deployed. |
jorgepiloto
left a comment
There was a problem hiding this comment.
Thanks for adding this, Mo. I don't se any blocking issues despite restoring the cheatsheet.
Done in 628ae39 |
My bad. I commented it out to test building the doc locally and forgot to revert. Thanks for restoring. |
RobPasMue
left a comment
There was a problem hiding this comment.
Works for me although I see it a bit "hacky" not gonna lie... From a developer's expectations... if I am running a workflow for tag "vX.Y.Z" and then the tag gets recreated... but my workflow keeps running pointing to the old tag (but the actions seem to use the new tag/commit)... this seems pretty weird and unexpected.
For me, cancelling the workflow and re-executing is definiteñy more fail-safe and consistent. But if anybody wants to use this.. up to them. I am expecting lots of issues, misconfigurations and debugging sessions for people that enable this.
It is a bit hacky, agreed. But as you said, people that choose to use this will be well aware of what to expect. I will also request a review from @da1910 to drop his two cents on what he thinks. |
TestsLegacy (i.e. multi-workflow) using this branch + GH environment where "Prevent self-review" is activated.
This test confirms two things: what was reported and that the legacy behavior is not impacted by the changes in this PR. So existing users do not have to do anything to their workflows when this is released. Single workflow approach (i.e. using changes in this branch) + GH environment where "Prevent self-review" is activated
As can be seen, all the jobs executed correctly. Most importantly, if you check the v0.9.0 GH release (what was released via single workflow approach), it points to the correct SHA ( |
|
If this PR can wait next week, I'd gladly have a look when I'm back :) Otherwise, I'll see the result afterward :D |
SMoraisAnsys
left a comment
There was a problem hiding this comment.
LGTM, thanks for the changes !
Co-authored-by: Sébastien Morais <[email protected]>
|
This PR has been closed. Documentation for this pull request will shortly be removed from its former deployment address. |
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Jorge Martinez <[email protected]> Co-authored-by: Sébastien Morais <[email protected]>


Closes #626.
This PR updates
doc-deploy-prto be usable in scenarios where users want to prevent multiple workflow runs, such as in #626. I will try to test with a sample project, but this can be reviewed now regardless. At least, I will like to know what people think about the approach before investing further time.The reasonable approach I could think of is adapting
doc-deploy-changelogin way that makes it compatible with single workflow runs, without too much extra configuration by the user. The idea is to have a "same-workflow" switch that controls legacy behavior (i.e. multi-workflow) vs single-workflow behavior. In the later case the action will produce an output containing the release SHA, which the user can then use to setup the remaining release steps.Summary
A couple of things to keep in mind:
checkoutinput that is exposed in most.GITHUB_TOKENbehaves such that it will not create a new workflow run when used to push to a PR (see relevant section in the docs). That behavior is also important for making this work.Having said that, these are the changes I made:
same-workflowinput todoc-deploy-changelogwhose purpose is to simply control whether the action should exit with error or not.release-commit-shaoutput that will point to the new commit that contains the changes made by the action (i.e. the updated changelog file where all the fragments have been combined).GITHUB_TOKEN(which will not trigger a re-run) instead ofPYANSYS_CI_BOT_TOKENto ensure the current workflow keeps running. You are probably thinking "but we are already not exiting with error, why is this necessary...", well, remember workflows can still be canceled because of concurrency?release-commit-sha. This is where thecheckoutinput comes in handy. Basically users can do a checkout step before calling an action and passcheckout: false. The will ensure everything runs from the new commit.release-githubaction has also been updated such that it supports the single-workflow scenario. It now exposes atag-nameinput which is passed to the underlying action being called behind the scenes.doc-deploy-stableaction also has a newrefinput that serves a similar purpose as the above.release-workflow.rstfile has been added that juxtaposes the legacy mode and the single workflow mode.doc-deploy-changelogaction has been updated.