Skip to content

Commit

Permalink
minor fix and boolean expressoin test (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix authored Jul 1, 2023
1 parent 260cbef commit 2e1f1a1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 43 additions & 1 deletion .github/workflows/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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' }}"
2 changes: 1 addition & 1 deletion .github/workflows/workflow_call-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: workflow call test
on:
on:
# pull_request:
workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2e1f1a1

Please sign in to comment.