-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
52 lines (42 loc) · 1.27 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: 'PKUPgen'
description: 'Generate PKUP reports and send them to email addresses or/and save them'
inputs:
generate:
description: 'Generate reports'
default: 'true'
required: false
send-emails:
description: 'Send emails'
default: 'true'
required: false
since:
description: 'Gen since (in format 02.01.2006)'
default: ''
required: false
until:
description: 'Gen until (in format 02.01.2006)'
default: ''
required: false
runs:
using: "composite"
steps:
- name: Installing pkup-gen
shell: bash
run: |
curl "https://raw.githubusercontent.com/pPrecel/pkup-gen-action/main/scripts/install-pkup-gen.sh" | sh -
- name: Generate reports
if: ${{ inputs.generate == 'true' }}
shell: bash
run: |
rm -rf reports
ARGS="--config .pkupcompose.yaml --ci"
[ ! -z "${{ inputs.since }}" ] && ARGS="$ARGS --since ${{ inputs.since }}"
[ ! -z "${{ inputs.until }}" ] && ARGS="$ARGS --until ${{ inputs.until }}"
bin/pkup compose ${ARGS}
- name: Send emails
if: ${{ inputs.send-emails == 'true' }}
shell: bash
run: |
ARGS="--config .pkupcompose.yaml"
[ ! -z "${{ inputs.until }}" ] && ARGS="$ARGS --timestamp ${{ inputs.until }}"
bin/pkup send ${ARGS}