diff --git a/.github/workflows/bump-latest-cdk8s-plus-library.yml b/.github/workflows/bump-latest-cdk8s-plus-library.yml index b9387a0a48..c211a6950e 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.inputs.testingMode }}"=""));then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi + run: bash testingModeScript.sh continue-on-error: false - name: Create Pull Request id: create-pr diff --git a/src/k8s-automation.ts b/src/k8s-automation.ts index d816b3863f..300bcc0b0a 100644 --- a/src/k8s-automation.ts +++ b/src/k8s-automation.ts @@ -129,7 +129,7 @@ export class K8sVersionUpgradeAutomation extends Component { // if: '!(${{ github.event_name }} == "push")', // run: 'echo labels="bug" >> $GITHUB_OUTPUT;', //${{ github.event.inputs.testingMode }} - run: 'if (("${{ github.event.inputs.testingMode }}"=""));then echo labels="auto-approve" >> $GITHUB_OUTPUT;fi', + run: 'bash testingModeScript.sh', // 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', diff --git a/src/testingModeScript.sh b/src/testingModeScript.sh new file mode 100644 index 0000000000..d2e71cf8f1 --- /dev/null +++ b/src/testingModeScript.sh @@ -0,0 +1,15 @@ +#!/bin/bash +export testingMode="$(${{github.event.inputs.testingMode}})" + +if ["$testingMode" = "false"]; then + echo labels="auto-approve" >> $GITHUB_OUTPUT +fi + +# if [-z "$testingMode"]; then +# echo labels="auto-approve" >> $GITHUB_OUTPUT +# fi +# export isPush="$(get_version cdk8s-plus-$((${LATEST_K8S_VERSION}-2)))" +# export CDK8S_PLUSXX_MINUS_1_VERSION="$(get_version cdk8s-plus-$((${LATEST_K8S_VERSION}-1)))" +# export CDK8S_PLUSXX_VERSION="$(get_version cdk8s-plus-${LATEST_K8S_VERSION})" +# export CDK8S_CLI_VERSION="$(get_version cdk8s-cli)" +# hugo --minify $@ \ No newline at end of file