forked from skillrepos/arg-count-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
26 lines (26 loc) · 765 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: 'Argument Counter'
description: 'Count # of arguments passed in'
inputs:
arguments-to-count: # input id
description: 'arguments to count'
required: true
default: ''
outputs:
arg-count:
description: "Count of arguments passed in"
value: ${{ steps.return-result.outputs.num-args }}
runs:
using: "composite"
steps:
- name: Print arguments if any
run: |
echo Arguments: ${{ inputs.arguments-to-count }}.
shell: bash
- id: find-result
run: |
echo "ARGCOUNT=`${{ github.action_path }}/count-args.sh ${{ inputs.arguments-to-count }}`" >> $GITHUB_ENV
shell: bash
- id: return-result
run: |
echo "::set-output name=num-args::$(echo ${{ env.ARGCOUNT }})"
shell: bash