forked from unikraft/kraftkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
106 lines (99 loc) · 2.68 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build unikernel images with Unikraft
description: Build, push and run unikernel images with Unikraft.
author: Unikraft
branding:
icon: package
color: blue
inputs:
#
# Global flags
#
loglevel:
description: Log-level of the action
required: false
default: error
#
# Project flags
#
workdir:
description: Path to the project directory.
required: false
kraftfile:
description: Alternative path for the Kraftfile or inline-Kraftfile.
required: false
#
# Build flags
#
arch:
description: Architecture to build for.
required: false
plat:
description: Platform to build for.
required: false
target:
description: Name of the target to build for.
required: false
#
# Running flags
#
execute:
description: If to run the unikernel.
required: false
default: false
timeout:
description: Timeout for the unikernel.
required: false
#
# Packaging flags
#
args:
description: Arguments to pass to the unikernel.
required: false
initrd:
description: Include an initrd at path.
required: false
memory:
description: Set the memory size. String of format "1M"/"1G"/"1K"
required: false
name:
description: Set the name of the output.
required: true
output:
description: Set the output path.
required: false
kconfig:
description: Include all set KConfig with the output.
required: false
# If to push the output to a registry
push:
description: Push the output.
required: false
default: false
runs:
# Use a composite type so we can execute a bash script before the invocation
# of the container image.
using: composite
steps:
- shell: bash
run: ${{ github.action_path }}/tools/github-action/pre.sh
- uses: docker://kraftkit.sh/github-action:v0
# This is a bit of a hack, since we are using a composite-type, the actions
# input are not passed when the container image is instantiated. Instead,
# we simply pass all inputs as environmental variables which are already
# compatible with the action itself.
env:
INPUT_LOGLEVEL: ${{ inputs.loglevel }}
INPUT_WORKDIR: ${{ inputs.workdir }}
INPUT_KRAFTFILE: ${{ inputs.kraftfile }}
INPUT_ARCH: ${{ inputs.arch }}
INPUT_PLAT: ${{ inputs.plat }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_EXECUTE: ${{ inputs.execute }}
INPUT_TIMEOUT: ${{ inputs.timeout }}
INPUT_ARGS: ${{ inputs.args }}
INPUT_INITRD: ${{ inputs.initrd }}
INPUT_MEMORY: ${{ inputs.memory }}
INPUT_NAME: ${{ inputs.name }}
INPUT_OUTPUT: ${{ inputs.output }}
INPUT_KCONFIG: ${{ inputs.kconfig }}
INPUT_PUSH: ${{ inputs.push }}