-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
58 lines (57 loc) · 1.74 KB
/
action.yml
File metadata and controls
58 lines (57 loc) · 1.74 KB
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
53
54
55
56
57
58
name: 'Upload BOM to BOMnipotent Server'
description: |-
Uploads a Bill of Materials (BOM) to a BOMnipotent Server.
author: 'Weichwerke Heidrich Software'
inputs:
bom:
description: |-
The filepath to the Bill of Materials (BOM) file to upload.
required: true
name:
description: |-
Overwrite the name of the BOM to upload.
Can be either a string literal, or a path to a file containing the value.
required: false
version:
description: |-
Overwrite the version of the BOM to upload.
Can be either a string literal, or a path to a file containing the value.
required: false
tlp:
description: |-
The Traffic Light Protocol (TLP) level of the BOM.
required: false
on-existing:
description: |-
What to do if a BOM with the same name and version already exists on the server.
Options are: 'error' (default behaviour), 'skip' or 'replace'.
required: false
default: 'error'
runs:
using: "composite"
steps:
- name: Set GitHub Path
run: echo "$GITHUB_ACTION_PATH" >> $GITHUB_PATH
shell: bash
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
- name: Upload BOM
run: |
args=()
if [ -n "${{ inputs.name }}" ]; then
args+=("--name=${{ inputs.name }}")
fi
if [ -n "${{ inputs.version }}" ]; then
args+=("--version=${{ inputs.version }}")
fi
if [ -n "${{ inputs.tlp }}" ]; then
args+=("--tlp=${{ inputs.tlp }}")
fi
if [ -n "${{ inputs.on-existing }}" ]; then
args+=("--on-existing=${{ inputs.on-existing }}")
fi
upload_bom.sh "${{ inputs.bom }}" "${args[@]}"
shell: bash
branding:
icon: 'triangle'
color: 'orange'