forked from Drewsif/PiShrink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
62 lines (59 loc) · 1.95 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
name: "Run PiShrink"
author: ethanjli
description: Shrinks and compresses a Raspberry Pi SD card image.
branding:
icon: minimize-2
color: red
inputs:
image:
description: Path of the image to shrink
required: true
destination:
description: Path to write the shrunken image to
required: false
compress:
description:
Compress the image after shrinking using gzip or xz;
if set, the `.gz` or `.xz` extension (respectively) will be added to the file name.
Allowed values are `gzip`, `xz`, and `none`.
required: false
default: none
compress-parallel:
description:
Compress the image in parallel using multiple cores;
use option `-f9` for pigz and option `-T0` for xz and compress in parallel
required: false
default: false
prevent-expansion:
description: Prevent automatic filesystem expansion when the image is booted for the first time
required: false
default: false
advanced-fs-repair:
description: Attempt to repair the filesystem using additional options if the normal repair fails
required: false
default: false
verbose:
description: Enable more verbose output
required: false
default: false
# TODO: expose the -d flag - but where does the debug log file get written, and how should we
# expose it?
outputs:
destination:
description: Path of the shrunken image
value: ${{ steps.run-pishrink.outputs.destination }}
runs:
using: composite
steps:
- id: run-pishrink
shell: bash
env:
INPUT_IMAGE: ${{ inputs.image }}
INPUT_DESTINATION: ${{ inputs.destination }}
INPUT_COMPRESS: ${{ inputs.compress }}
INPUT_COMPRESS_PARALLEL: ${{ inputs.compress-parallel }}
INPUT_PREVENT_EXPANSION: ${{ inputs.prevent-expansion }}
INPUT_ADVANCED_FS_REPAIR: ${{ inputs.advanced-fs-repair }}
INPUT_VERBOSE: ${{ inputs.verbose }}
run: |
${{ github.action_path }}/gha-wrapper-pishrink.sh