forked from jrandiny/apt-repo-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
126 lines (109 loc) · 4.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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Basic information for the custom GitHub Action.
name: 'GitHub Pages APT Repository'
description: 'Quickly and easily setup, manage and publish an APT repository hosted on GitHub Pages.'
author: 'Didstopia'
# Branding for the custom GitHub Action.
branding:
icon: 'globe'
color: 'green'
# The inputs for the custom GitHub Action.
inputs:
token:
description: 'GitHub token used to manage the APT repository on GitHub Pages. (optional, eg. `GITHUB_TOKEN`, default: `github.token`))'
required: false
default: ${{ github.token }}
branch:
description: 'The repository branch to use for hosting the APT repository on Github Pages. (optional, eg. `"my-apt-repo"`, default: `"gh-pages"`)'
required: false
default: 'gh-pages'
## TODO: Is this specifically the filesystem path on the branch, or on the website? Or both, since they're linked anyway?!
folder:
description: 'The location or path for the APT repository, relative to the root of the GitHub Pages deployment. (optional, eg. `"my-folder"`, default: `"packages"`)'
required: false
default: 'packages'
## TODO: Add string array support to this intead?!
platform:
description: 'The platform/architecture of the .deb package. (optional, eg. `"amd64"`, default: `"amd64"`)'
required: false
default: 'amd64'
# platforms:
# description: 'A JSON string array of supported architectures. (optional, e.g. `"[ "amd64", "arm64" ]"`, default: `"[ "amd64" ]"`)'
# required: false
# default: '[ "amd64" ]'
## TODO: What do we need this for?!
# targets:
# description: 'A JSON string array of supported linux version targets. (optional, e.g. `"[ "buster", "bullseye" ]"`, default: `"[ "bullseye" ]"`)'
# # required: true
# required: false
# default: '[ "bullseye" ]'
target:
description: 'The target OS version/name for the .deb package. (optional, eg. `"bullseye"`, default: `"bullseye"`)'
required: false
default: 'bullseye'
## TODO: Add string array support to this intead?!
# packages:
# description: 'A JSON string array of .deb package file paths to include in the APT repository. (required, eg. `"[ "package.deb", "package2.deb" ]"`)'
# required: true
# default: '[ ]'
package:
description: 'The .deb package file path to include in the APT repository. (required, eg. `"foo/bar/package.deb"`)'
required: true
# default: ''
## TODO: How do we want to handle this?!
# versions:
# description: 'A JSON string array of target versions for the supplied .deb packages. (required, eg. `"[ "1.0.0", "1.0.1" ]"`)'
# required: true
# default: '[ ]'
version:
description: 'The full version string for the supplied .deb package. (required, eg. `"1.0.0"`)'
required: true
# default: ''
## TODO: Is this auto-generated if we don't set it?!
public_key:
description: 'The GPG public key used for the APT repository. (optional, eg. `GPG_PUBLIC_KEY`)'
required: false
default: ''
## TODO: Is this auto-generated if we don't set it?!
private_key:
description: 'The GPG private key used for the APT repository. (optional, eg. `GPG_PRIVATE_KEY`)'
# required: true ## TODO: Why was this required, when the public key was not?!
required: false
default: ''
## TODO: Is this auto-generated if we don't set it?!
private_key_passphrase:
description: 'The passphrase for the GPG private key. (optional, eg. `GPG_PRIVATE_KEY_PASSPHRASE`)'
required: false
default: ''
dry_run:
description: 'Enable dry-run mode, which will not create or modify the APT repository, or GitHub Pages, in any way. (optional, eg. `true`, default: `false`)'
required: false
verbose:
description: 'Enable more verbose logging, useful for debugging. (optional, eg. `true`, default: `false`)'
required: false
## TODO: How can we set the output? Can we simply set it inside the Docker container, from the Python script?!
# The outputs for the custom GitHub Action.
outputs:
url:
description: 'The URL of the hosted APT repository on GitHub pages.'
## TODO: Utilize proper exit codes for any issues!
## TODO: Log to GitHub Actions log with the correct log level (info, warning, error, etc.)!
## TODO: Handle tagging, releases and testing properly! (see: https://docs.github.com/en/actions/creating-actions/releasing-and-maintaining-actions)
# Define how to run the custom GitHub Action.
runs:
using: 'docker'
## TODO: Can we use an input to set the image tag?
# image: 'Dockerfile'
# image: 'docker://ghcr.io/didstopia/apt-repo-action:latest'
image: 'docker://ghcr.io/didstopia/apt-repo-action:bleeding'
# args:
# - ${{ inputs.token }}
# - ${{ inputs.branch }}
# - ${{ inputs.folder }}
# - ${{ fromJson(inputs.platforms) }}
# - ${{ fromJson(inputs.targets) }}
# - ${{ fromJson(inputs.packages) }}
# - ${{ fromJson(inputs.versions) }}
# - ${{ inputs.public_key }}
# - ${{ inputs.private_key }}
# - ${{ inputs.private_key_passphrase }}
# - ${{ inputs.verbose }}