Skip to content

Commit

Permalink
laksdjbfn
Browse files Browse the repository at this point in the history
Signed-off-by: Sumu <[email protected]>
  • Loading branch information
sumupitchayan committed Oct 19, 2023
1 parent d71d5d1 commit 8f80224
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/bump-latest-cdk8s-plus-library.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/k8s-automation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,19 @@ export class K8sVersionUpgradeAutomation extends Component {
outputName: 'httpStatus',
},
},
env: {
testingMode: 'true',
},
steps: [
{
name: 'Set testingMode env variable',
run: 'bash src/setTestingModeVar.sh ${{ github.event.inputs.testingMode }}',
},
{
name: 'PRINT testing mode var',
run: 'echo env.testingMode',
},

{
id: 'get-k8s-latest-release',
name: 'Get latest K8s Release',
Expand Down
33 changes: 25 additions & 8 deletions src/testingModeScript.sh → src/setTestingModeVar.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
#!/bin/bash
export githubEvent="$1"
export testingMode="$2"

# if [ "$githubEvent" = "push" ]; then
TESTING_MODE_INPUT="$1"
# Use user input or fall back to "true"
echo testingMode=${TESTING_MODE_INPUT:-"true"} >> $GITHUB_ENV
# use $NAME in your action, value will be always provided






# export githubEvent="$1"
# export testingMode="$2"

# # if [ "$githubEvent" = "push" ]; then
# # echo labels="auto-approve" >> $GITHUB_OUTPUT
# # fi

# if [ "$testingMode" = "false" ]; then
# echo labels="auto-approve" >> $GITHUB_OUTPUT
# else
# echo labels="" >> $GITHUB_OUTPUT
# fi

if [ "$testingMode" = "false" ]; then
echo labels="auto-approve" >> $GITHUB_OUTPUT
else
echo labels="" >> $GITHUB_OUTPUT
fi






# if [[$testingMode]]; then
# echo labels="auto-approve" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 8f80224

Please sign in to comment.