Replies: 1 comment
-
Bump. Having the same issue. Did anyone manage to get that working? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've tried to use
nrwl/nx-set-shas
github action that is supposed to resolve commit SHAs so that affected commands can execute properly but there seems to be an issue when the job is running in a "workflow_run" triggered action (ex.:on: workflow_run: workflows: ['Other workflow']
).The reason I'm trying to use "workflow_run" trigger is to basically have a workflow that is triggered after some another workflow (test workflow) so that I can deploy using nx affected command (ex.:
npx nx affected --target=deploy
).I've tried all possible configuration variations with
nrwl/nx-set-shas
but it does not seem to work and always saying that it's unable to find last successful workflow run:Unable to find a successful workflow run on 'origin/main'
.I've already ran this workflow once successfully so there should be at least one instance it could resolve but it just does not seem to be able to resolve specifically "workflow_run" triggered workflows.
If I set the
workflow-id
option to my other workflow which is triggered normally (push) then it works fine, but it resolves already the last commit from that workflow run which basically means that affected commands in the "workflow_run" triggered workflow would never run anything as it's running always after that workflow so head and base SHAs will be the same.Hence my question is: how to properly affected commands in "workflow_run" triggered github action?
Is it even possible in current state? And if not - can we open a feature request to support this use-case?
As of now I'm forced to inline my deploy workflow into the test workflow so that nx affected could resolve SHAs properly.
P.S. You can see my failing workflow and it's failure in github actions.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions