Skip to content

Commit 6cd84de

Browse files
committed
first attempt
1 parent a7ce08e commit 6cd84de

File tree

4 files changed

+79
-1
lines changed

4 files changed

+79
-1
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM vouchio/linuxkit-docker
2+
3+
COPY entrypoint.sh /entrypoint.sh
4+
5+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# linuxkit-build
2-
A Github action to enable LinuxKit builds
2+
A Github action to enable LinuxKit OS image builds
3+
4+
## Inputs
5+
6+
### `config`
7+
8+
**Required** LinuxKit YAML configuration to build (eg lxk-build.yml). There is no default.
9+
10+
### `format`
11+
12+
**Optional** The format for the output (eg `aws`, `gcp`, `iso-efi`, etc...).
13+
14+
**Default** `kernel+initrd`
15+
16+
## Outputs
17+
18+
### `files`
19+
20+
The files that were built
21+
22+
## Example usage - default
23+
24+
```yaml
25+
uses: actions/linuxkit-docker-action@v1
26+
with:
27+
config: lxk-build.yml
28+
```
29+
30+
## Example usage - AWS
31+
32+
```yaml
33+
uses: actions/linuxkit-docker-action@v1
34+
with:
35+
config: lxk-build.yml
36+
format: aws
37+
```
38+
339
440
# License
541
The scripts and documentation in this project are released under the [MIT License](LICENSE)

action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: linuxkit-builder
2+
author: 'Ray McDermott'
3+
description: 'Build multiarch OS images using LinuxKit'
4+
branding:
5+
icon: package
6+
color: purple
7+
inputs:
8+
config:
9+
description: 'LinuxKit YAML configuration to build (eg lxk-build.yml)'
10+
required: true
11+
format:
12+
description: 'The output format (eg aws, gcp, iso-efi, etc...)'
13+
required: false
14+
default: 'kernel+initrd'
15+
outputs:
16+
files:
17+
description: 'The file(s) that were built'
18+
runs:
19+
using: 'docker'
20+
image: 'Dockerfile'
21+
args:
22+
- ${{ inputs.config }}
23+
- ${{ inputs.format }}
24+

entrypoint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
OUTPUT_DIR=/tmp/lxk-build
6+
7+
mkdir ${OUTPUT_DIR}
8+
9+
linuxkit build -dir ${OUTPUT_DIR} -format $2 $1
10+
11+
files=$(find ${OUTPUT_DIR} -type f)
12+
13+
echo ::set-output name=files::${files}

0 commit comments

Comments
 (0)