-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
action.yml
92 lines (89 loc) · 3.66 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
name: Setup Alpine Linux environment
description: >
Set up a chroot-based Alpine Linux environment and optionally QEMU user emulator for non-x86 architectures.
author: Jakub Jirutka
branding:
color: blue
icon: terminal
inputs:
apk-tools-url:
description: >
URL of the apk-tools static binary to use. It must end with `#!sha256!` followed by a SHA-256
hash of the file.
This should normally be left at the default value.
required: false
default: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.5/x86_64/apk.static#!sha256!db4a1fee5e1533593a880f5a30dac992a90e63df190c1dfb8c21ff4155527143
arch:
description: >
CPU architecture to emulate using QEMU. Allowed values are: `x86_64` (native), `x86` (native),
`aarch64`, `armhf` (armv6 with hard-float), `armv7`, `ppc64le`, `riscv64` (available since v3.20), and `s390x`
required: false
default: x86_64
branch:
description: Alpine branch (aka release) to install (e.g. `v3.15`, `latest-stable`, `edge`).
required: false
default: latest-stable
extra-keys:
description: >
A list of paths of additional trusted keys (for installing packages from the
extra-repositories) to copy into /etc/apk/keys/. The paths should be relative to the
workspace directory (the default location of your repository when using the checkout action).
required: false
default: ''
extra-repositories:
description: >
A list of additional Alpine repositories to add into /etc/apk/repositories (Alpine's official
main and community repositories are always added).
required: false
default: ''
mirror-url:
description: URL of an Alpine Linux mirror to fetch packages from.
required: false
default: http://dl-cdn.alpinelinux.org/alpine
packages:
description: A list of Alpine packages to install.
required: false
default: ''
shell-name:
description: >
Name of the script to run `sh` in the Alpine chroot that will be added to `GITHUB_PATH`.
This name should be used in `jobs.<job_id>.steps[*].shell` (e.g. `shell: alpine.sh {0}`) to
run the step's script in the chroot.
required: false
default: alpine.sh
volumes:
description: >
A list of directories on the host system to mount bind into the chroot. You can specify the
source and destination path: `<src-dir>:<dest-dir>``. The `<src-dir>` is an absolute path of
existing directory on the host system, `<dest-dir>` is an absolute path in the chroot
(it will be created if doesn't exist). You can omit the latter if they're the same.
Please note that /home/runner/work (where's your workspace located) is always mounted,
don't specify it here.
required: false
default: ''
outputs:
root-path:
description: >
Path to the created Alpine root directory (also exposed in environment
variable ALPINE_ROOT_PATH).
value: ${{ steps.setup.outputs.root-path }}
runs:
using: composite
steps:
- id: setup
env:
INPUT_APK_TOOLS_URL: ${{ inputs.apk-tools-url }}
INPUT_ARCH: ${{ inputs.arch }}
INPUT_BRANCH: ${{ inputs.branch }}
INPUT_EXTRA_KEYS: ${{ inputs.extra-keys }}
INPUT_EXTRA_REPOSITORIES: ${{ inputs.extra-repositories }}
INPUT_MIRROR_URL: ${{ inputs.mirror-url }}
INPUT_PACKAGES: ${{ inputs.packages }}
INPUT_SHELL_NAME: ${{ inputs.shell-name }}
INPUT_VOLUMES: ${{ inputs.volumes }}
run: sudo -E ./setup-alpine.sh
working-directory: ${{ github.action_path }}
shell: bash
- uses: webiny/[email protected]
with:
run: sudo "${{ steps.setup.outputs.root-path }}"/destroy.sh