-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaction.yml
50 lines (49 loc) · 1.83 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
name: 'OpenWrt ImageBuilder'
description: 'Build OpenWrt custom images using ImageBuilder - https://openwrt.org/docs/guide-user/additional-software/imagebuilder '
inputs:
profile:
description: 'Specifies the target image to build - PROFILE'
required: true
default: 'bcm27xx-bcm2711'
openwrt-version:
description: 'OpenWrt version'
required: true
default: 'master'
packages:
description: 'A list of packages to embed into the image - PACKAGES'
required: false
default: ''
files:
description: 'Directory with custom files to include - FILES'
required: false
default: 'files'
disabled-services:
description: 'The names of services from /etc/init.d to disable, e.g. dhcp for dnsmasq - DISABLED_SERVICES'
required: false
default: ''
bin-dir:
description: 'Alternative output directory for the images - BIN_DIR'
required: false
default: 'bin'
debug:
description: 'Set to "1" to enable additional debug info like the content of .config'
required: false
default: ''
runs:
using: 'composite'
steps:
- run: |
mkdir bin && chmod 777 bin && \
docker run --rm \
-v ${{ github.action_path }}/make_image.sh:/home/build/openwrt/github_make_image.sh \
-v "$(pwd)"/${{ inputs.files }}/:/home/build/openwrt/files \
-v "$(pwd)"/${{ inputs.bin-dir }}/:/home/build/openwrt/bin:rw \
-e PACKAGES="${{ inputs.packages }}" \
-e DISABLED_SERVICES="${{ inputs.disabled-services }}" \
-e FILES="files" \
-e DEBUG="${{ inputs.debug }}" \
-e OPENWRT_VERSION="${{ inputs.openwrt-version }}" \
-e OPENWRT_PROFILE="${{ inputs.profile }}" \
openwrtorg/imagebuilder:${{ inputs.profile }}-${{ inputs.openwrt-version }} \
/home/build/openwrt/github_make_image.sh
shell: bash