-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
48 lines (44 loc) · 1.91 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
name: "Docker Compose Mender Artifact"
description: "Create a mender artifact to install docker containers using a docker-compose file."
author: "Quartx(William Forde)"
inputs:
compose-file:
description: "Path to docker-compose.yml file"
required: true
compose-file-variables:
description: "Variables to use if compose file is a template, e.g. 'NAME=VARIABLE', multiple values separated by a space"
required: false
default: ""
software-name:
description: "Name of software being packaged"
required: true
software-version:
description: "Value for the software version, defaults to workflow run id"
required: false
default: "${{ github.run_number }}"
device-types:
description: "Target device type identifications, multiple values separated by a space"
required: true
signing-key:
description: "The private key that will be used to sign the artifact"
required: false
default: ""
outputs:
artifact-file:
description: "The filename for the mender artifact file"
value: ${{ steps.artifact-filename.outputs.filename }}
runs:
using: "composite"
steps:
- id: artifact-filename
run: echo "::set-output name=filename::${{ inputs.software-name }}-${{ inputs.software-version }}.artifact.mender"
shell: bash
- shell: bash
run: curl https://downloads.mender.io/mender-artifact/3.6.0/linux/mender-artifact --output /usr/local/bin/mender-artifact
- shell: bash
run: chmod +x /usr/local/bin/mender-artifact
- shell: bash
run: python3 $GITHUB_ACTION_PATH/action.py "${{ inputs.compose-file }}" --variables "${{ inputs.compose-file-variables }}" --device-types ${{ inputs.device-types }} --software-name "${{ inputs.software-name }}" --software-version ${{ inputs.software-version }} --output-path "${{ steps.artifact-filename.outputs.filename }}" --signing-key "${{ inputs.signing-key }}"
branding:
icon: 'briefcase'
color: 'purple'