Skip to content

Commit

Permalink
Merge pull request #9 from cytopia/release-0.1.8
Browse files Browse the repository at this point in the history
Allow flag to be 0, 1, false or true
  • Loading branch information
cytopia authored Mar 29, 2022
2 parents 985a401 + aafed9c commit d3dca11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following inputs can be used to alter the Docker tag name determination:
| `branches` | No | `` | Optionally specify a comma separated list of branches to add to the build matrix. |
| `tags` | No | `` | Optionally specify a comma separated list of tags to add to the build matrix. |
| `num_latest_tags` | No | `0` | Optionally add x number of latest git tags to the build matrix (requires `repository_default_branch` to point to your repository's main branch. |
| `disable_refs` | No | `0` | Optionally force to disable all refs alltogether by returning an empty matrix and has_refs=0. |
| `disable_refs` | No | `0` | Optionally force to disable all refs alltogether by returning an empty matrix and has_refs=0. Values: `0`, `1`, `false`, `true` |


## :arrow_backward: Outputs
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ inputs:
required: false
default: 0
disable_refs:
description: 'A Flag to disable refs alltogether and return an empty matrix and has_refs=0.'
description: 'A Flag (0 or 1 or false or true) to disable refs alltogether and return an empty matrix and has_refs=0.'
required: false
default: 0

Expand All @@ -47,13 +47,13 @@ runs:
ref: ${{ inputs.repository_default_branch }}
fetch-depth: 0
path: .git-ref-matrix-action
if: ${{ inputs.disable_refs == 0 && inputs.num_latest_tags > 0 }}
if: ${{ (inputs.disable_refs == 0 || inputs.disable_refs == '0' || inputs.disable_refs == 'false') && inputs.num_latest_tags > 0 }}

- name: "[SETUP] Build and Export Matrix"
id: set-matrix
shell: bash
run: |
if [ "${{ inputs.disable_refs }}" = "1" ]; then
if [ "${{ inputs.disable_refs }}" = "1" ] || [ "${{ inputs.disable_refs }}" = "true" ]; then
###
### Output matrix
###
Expand Down

0 comments on commit d3dca11

Please sign in to comment.