From 2e1f1a123d5352f80ce2499a14ad0a2917b3b583 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 1 Jul 2023 16:35:57 +0900 Subject: [PATCH] minor fix and boolean expressoin test (#94) --- .github/release-drafter.yml | 2 +- .github/workflows/events.yml | 44 +++++++++++++++++++++++- .github/workflows/workflow_call-test.yml | 2 +- Makefile | 2 +- 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 5c897c2..0b331b4 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -47,7 +47,7 @@ version-resolver: - 'security' default: patch template: | - [Compare $PREVIOUS_TAG with v$RESOLVED_VERSION](https://github.com/srz-zumix/gh-act/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) + [Compare $PREVIOUS_TAG with v$RESOLVED_VERSION](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)) ## Changes diff --git a/.github/workflows/events.yml b/.github/workflows/events.yml index c0d0987..0b015ef 100644 --- a/.github/workflows/events.yml +++ b/.github/workflows/events.yml @@ -78,6 +78,14 @@ on: description: 'Name' required: true type: string + tv: + description: 'true flag' + type: boolean + default: true + fv: + description: 'false flag' + type: boolean + default: false secrets: DOCKERHUB_USERNAME: required: true @@ -88,6 +96,14 @@ on: name: description: 'Name' required: true + tv: + description: 'true flag' + type: boolean + default: true + fv: + description: 'false flag' + type: boolean + default: false workflow_run: workflows: [Lint] types: @@ -145,4 +161,30 @@ jobs: TEST_JSON: ${{ vars.TEST_JSON }} run: | echo "${VARS_CONTEXT}" - + - name: Boolean expression (yes) + run: | + echo "${{ inputs.tv }}" + echo "${{ inputs.tv == true }}" + echo "${{ inputs.tv != true }}" + echo "${{ inputs.tv == 'true' }}" + echo "${{ inputs.tv != 'true' }}" + echo "${{ inputs.tv == false }}" + echo "${{ inputs.tv != false }}" + echo "${{ inputs.tv == 'false' }}" + echo "${{ inputs.tv != 'false' }}" + - name: Boolean expression (no) + run: | + echo "${{ inputs.fv }}" + echo "${{ inputs.fv == true }}" + echo "${{ inputs.fv != true }}" + echo "${{ inputs.fv == 'true' }}" + echo "${{ inputs.fv != 'true' }}" + echo "${{ inputs.fv == false }}" + echo "${{ inputs.fv != false }}" + echo "${{ inputs.fv == 'false' }}" + echo "${{ inputs.fv != 'false' }}" + - name: Boolean expression (and/or) + run: | + echo "${{ (inputs.tv && 'yes') || 'no' }}" + echo "${{ (inputs.tv == true && 'yes') || 'no' }}" + echo "${{ (inputs.tv == 'true' && 'yes') || 'no' }}" diff --git a/.github/workflows/workflow_call-test.yml b/.github/workflows/workflow_call-test.yml index 86f0d93..86d2279 100644 --- a/.github/workflows/workflow_call-test.yml +++ b/.github/workflows/workflow_call-test.yml @@ -1,5 +1,5 @@ name: workflow call test -on: +on: # pull_request: workflow_dispatch: diff --git a/Makefile b/Makefile index a9b112b..ec1c196 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ install: ## install gh extention install-released: gh extension remove "${EXTENSION_NAME}" || : - gh extension install "srz-zumix/${EXTENSION_NAME}" + gh extension install "srz-zumix/gh-${EXTENSION_NAME}" act_value_opts: @act --help | grep -o -e "-.*\s*string\w*\s" | sed -e "s/,/|/g" -e "s/string.*/) shift ;;/g"