-
Notifications
You must be signed in to change notification settings - Fork 300
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
fix(workflows): auto-approve labelling conditional statement always runs true #1574
Conversation
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…estingMode false is passed in as default Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
@sumupitchayan Can't you move the condition out of the |
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
@iliapolo I tried doing that earlier with this: {
name: 'Set auto-approve label for PR if in testing mode',
id: 'set-auto-approve-label',
run: 'if (${{ github.event.inputs.testingMode }} == false);then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi',
env: { GITHUB_TOKEN: '${{ secrets.PROJEN_GITHUB_TOKEN }}' },
continueOnError: false,
},
...WorkflowActions.createPullRequest({
...
labels: [
'${{ steps.set-auto-approve-label.outputs.labels }}',
],
}), But it doesn't seem to be working in the |
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…step after yarn install Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: github-actions <github-actions@github.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…com/cdk8s-team/cdk8s into sumughan/fix-auto-approve-labelling
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: github-actions <github-actions@github.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…com/cdk8s-team/cdk8s into sumughan/fix-auto-approve-labelling
Signed-off-by: github-actions <github-actions@github.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…com/cdk8s-team/cdk8s into sumughan/fix-auto-approve-labelling
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: github-actions <github-actions@github.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…com/cdk8s-team/cdk8s into sumughan/fix-auto-approve-labelling
…bsite job Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: github-actions <github-actions@github.com>
We decided to drop this |
Follow up to #1428
We initially wanted to conditionally set the
auto-approve
label of PR's in this workflow based on atestingMode
input parameter. This first step is supposed to conditionally set thelabels
output toauto-approve
iftestingMode
was set to false:And would then be used in the following step creating a PR like so:
However, there is a very annoying known bug in GitHub workflow steps where conditions are always evaluated as true when containing expression syntax inside. This causes the
auto-approve
label to always be added to PR's in the Kubernetes upgrade workflow, even whentestingMode
is set totrue
.I've had a hard time finding workarounds to this problem. Right now what I'm just doing is manually commenting-out the steps that involve publishing or setting the
auto-approve
label of PR's created.