-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
86 lines (86 loc) · 2.37 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
name: 'toltecmk-action'
description: Build a package with toltecmk for the reMarkable tablet
author: Eeems
branding:
icon: tablet
color: white
inputs:
path:
description: Path to the folder to build
required: false
default: ${{ github.workspace }}
work_dir:
description: Path to a directory used for building the package.
required: false
default: build
dist_dir:
description: Path to a directory where built packages are stored.
required: false
default: dist
arch:
description: List of architectures to build.
required: false
default: ''
package:
description: List of packages to build.
required: false
default: ''
hook:
description: |
Names or paths to a Python module that registers
listeners for build hooks. Paths must start with
either a dot or a slash.
required: false
default: ''
verbose:
description: Show debugging information.
required: false
type: boolean
default: false
warnings:
description: |
Control warnings. 'default' sends warnings to stderr
and removes duplicate warnings, 'ignore' silences any
warning, and 'error' turns warnings into exceptions.
required: false
default: default
type: choice
options:
- default
- error
- ignore
runs:
using: composite
steps:
- name: Parse arguments
id: args
shell: bash
run: ./args.sh
working-directory: ${{ github.action_path }}
env:
arch: ${{ inputs.arch }}
package: ${{ inputs.package }}
hook: ${{ inputs.hook }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install toltecmk
shell: bash
run: pip install toltecmk
- name: Build package
shell: bash
run: |
toltecmk \
${{ inputs.verbose && '--verbose' || '' }} \
--work-dir "$(realpath "$work_dir")" \
--dist-dir "$(realpath "$dist_dir")" \
--warnings "$warnings" \
${{ join(fromJSON(steps.args.outputs.arch), ' ') }} \
${{ join(fromJSON(steps.args.outputs.package), ' ') }} \
${{ join(fromJSON(steps.args.outputs.hook), ' ') }}
env:
work_dir: ${{ inputs.work_dir }}
dist_dir: ${{ inputs.dist_dir }}
warnings: ${{ inputs.warnings }}
working-directory: ${{ inputs.path }}