From 4bbaf29ceb6c69f1734edc3beff19f50ecd8c631 Mon Sep 17 00:00:00 2001 From: Sumu Date: Thu, 19 Oct 2023 10:44:28 -0400 Subject: [PATCH] switch to testing mode in brackets Signed-off-by: Sumu --- .github/workflows/bump-latest-cdk8s-plus-library.yml | 2 +- src/k8s-automation.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-latest-cdk8s-plus-library.yml b/.github/workflows/bump-latest-cdk8s-plus-library.yml index be840f787a..2610ea639d 100644 --- a/.github/workflows/bump-latest-cdk8s-plus-library.yml +++ b/.github/workflows/bump-latest-cdk8s-plus-library.yml @@ -67,7 +67,7 @@ jobs: id: set-auto-approve-label env: GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }} - run: if [${{ github.event_name }} = "push"];then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi + run: if [${{ github.event.inputs.testingMode }}];then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi continue-on-error: false - name: Create Pull Request id: create-pr diff --git a/src/k8s-automation.ts b/src/k8s-automation.ts index 8f9817aa47..8f5594b1b3 100644 --- a/src/k8s-automation.ts +++ b/src/k8s-automation.ts @@ -128,7 +128,8 @@ export class K8sVersionUpgradeAutomation extends Component { id: 'set-auto-approve-label', // if: '!(${{ github.event_name }} == "push")', // run: 'echo labels="bug" >> $GITHUB_OUTPUT;', - run: 'if [${{ github.event_name }} = "push"];then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi', + run: 'if [${{ github.event.inputs.testingMode }}];then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi', + // run: 'if [${{ github.event_name }} = "push"];then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi', // if: 'github.event.inputs.testingMode == false', // run: 'echo labels="auto-approve" >> $GITHUB_OUTPUT', env: { GITHUB_TOKEN: '${{ secrets.PROJEN_GITHUB_TOKEN }}' },