-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
44 lines (44 loc) · 1.06 KB
/
action.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# action.yml
name: 'update tag'
description: 'Greet someone and record the time'
inputs:
path: # id of input
description: 'the path to zip up recursively'
required: true
type: string
default: '.'
zip-file-name:
description: 'name of zip file'
required: true
type: string
default: 'files.zip'
exclusions:
description: 'files to exclude, space seprated'
required: false
type: string
default: ''
inclusions:
description: 'files to include, space separated'
required: false
type: string
default: ''
runs:
using: 'composite'
steps:
- name: script
id: update
shell: bash
run: |
CMD="/usr/bin/zip -r $ZIPFILENAME $PATH "
if [[ $INCLUDES != '' ]]; then
CMD="${CMD} -i ${INCLUDES} "
fi
if [[ $EXCLUDES != '' ]]; then
CMD="${CMD} -x ${EXCLUDES} "
fi
$CMD
env:
PATH: ${{ inputs.path }}
ZIPFILENAME: ${{ inputs.zip-file-name }}
INCLUDES: ${{ inputs.includes }}
EXCLUDES: ${{ inputs.excludes }}