Skip to content

Commit ff96863

Browse files
authored
Merge pull request #10 from cytopia/release-0.1.9
Use booleans instead of 0/1
2 parents d3dca11 + 1fad1cf commit ff96863

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ This composite action creates a stringified JSON list of git refs to be used as
1414

1515
The following inputs can be used to alter the Docker tag name determination:
1616

17-
| Input | Required | Default | Description |
18-
|--------------------------------|----------|----------|-------------------------------------------------------------------------------------------------------|
19-
| `repository_default_branch` | No | `master` | Optionally to fetch x number of latest tags from repository's main branch to add to the build matrix. |
20-
| `branches` | No | `` | Optionally specify a comma separated list of branches to add to the build matrix. |
21-
| `tags` | No | `` | Optionally specify a comma separated list of tags to add to the build matrix. |
22-
| `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. |
23-
| `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` |
17+
| Input | Type | Required | Default | Description |
18+
|--------------------------------|---------|----------|----------|-------------------------------------------------------------------------------------------------------|
19+
| `repository_default_branch` | string | No | `master` | Optionally to fetch x number of latest tags from repository's main branch to add to the build matrix. |
20+
| `branches` | string | No | `` | Optionally specify a comma separated list of branches to add to the build matrix. |
21+
| `tags` | string | No | `` | Optionally specify a comma separated list of tags to add to the build matrix. |
22+
| `num_latest_tags` | number | 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. |
23+
| `disable_refs` | boolean | No | `false` | Optionally force to disable all refs alltogether by returning an empty matrix and has_refs=false. Values: `0`, `1`, `false`, `true` |
2424

2525

2626
## :arrow_backward: Outputs
2727

28-
| Output | Description |
29-
|--------------|-----------------------------------------------------------------------------|
30-
| `matrix` | Stringified JSON build matrix. Example: `["master","v0.1.0"]` |
31-
| `has_refs` | Flag (0 or 1) that tells if we have matrix refs or not. Example: `0` or `1` |
28+
| Output | Type | Description |
29+
|--------------|---------|---------------------------------------------------------------------------|
30+
| `matrix` | string | Stringified JSON build matrix. Example: `["master","v0.1.0"]` |
31+
| `has_refs` | boolean | Flag that tells if we have matrix refs or not. Example: `true` or `false` |
3232

3333

3434
## :computer: Usage

action.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ inputs:
3131

3232
outputs:
3333
matrix:
34-
description: "Stringified JSON build matrix for defined git refs. (list of strings)"
34+
description: "(string) Stringified JSON build matrix for defined git refs. (list of strings)"
3535
value: ${{ steps.set-matrix.outputs.matrix }}
3636
has_refs:
37-
description: "Flag (0 or 1) that tells if we have matrix (list not empty) refs or not (list empty)."
37+
description: "(boolean) Flag that tells if we have matrix (list not empty) refs or not (list empty)."
3838
value: ${{ steps.set-matrix.outputs.has_refs }}
3939

4040
runs:
@@ -58,9 +58,9 @@ runs:
5858
### Output matrix
5959
###
6060
echo "::set-output name=matrix::[]"
61-
echo "::set-output name=has_refs::0"
61+
echo "::set-output name=has_refs::false"
6262
echo "matrix=[]"
63-
echo "has_refs=0"
63+
echo "has_refs=false"
6464
else
6565
###
6666
### Convert comma separated branches and tags to newline separated
@@ -127,9 +127,9 @@ runs:
127127
### Set 'has_refs'
128128
###
129129
if [ "${JSON}" = "[]" ]; then
130-
HAS_REFS="0"
130+
HAS_REFS="false"
131131
else
132-
HAS_REFS="1"
132+
HAS_REFS="true"
133133
fi
134134
echo "::set-output name=has_refs::${HAS_REFS}"
135135

0 commit comments

Comments
 (0)