From 7523b26ee86549aa5c78604d9c49aeaf99f1d890 Mon Sep 17 00:00:00 2001 From: Alistair Young Date: Tue, 26 Jan 2021 10:03:50 -0600 Subject: [PATCH] Second test. --- Dockerfile | 4 +++- action.yaml | 26 ++++++++++++++++++++++++++ entrypoint.py | 12 ++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 entrypoint.py diff --git a/Dockerfile b/Dockerfile index 9f903dc..467611e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,6 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt update RUN apt install -y reprepro gpg python3 python3-git python3-gnupg expect python3-debian -ENTRYPOINT ["python3"] +COPY entrypoint.py /entrypoint.py + +ENTRYPOINT ["python3", "/entrypoint.py"] diff --git a/action.yaml b/action.yaml index c7300da..5b78c9f 100644 --- a/action.yaml +++ b/action.yaml @@ -4,6 +4,32 @@ inputs: debug: description: "Print debug log" required: false + github_token: + description: "GitHub token with commit and push scope." + required: true + repo_supported_arch: + description: "Newline-delimited list of supported architectures." + required: true + repo_supported_distro: + description: "Newline-delimited list of supported distributions." + required: true + repo_directory: + description: "Location of APT repo folder relative to git repo root." + required: false + default: "apt" + update_directory: + description: "Directory in which updated packages are placed." + required: false + default: "updates" + public_key: + description: "GPG public key for apt repo" + required: false + private_key: + description: "GPG private key for signing apt repo" + required: false + key_passphrase: + description: "Passphrase of GPG private key" + required: false runs: using: "docker" image: "Dockerfile" diff --git a/entrypoint.py b/entrypoint.py new file mode 100644 index 0000000..b482955 --- /dev/null +++ b/entrypoint.py @@ -0,0 +1,12 @@ +import os +import logging + +debug = os.environ.get('INPUT_DEBUG', False) + +if debug: + logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) +else: + logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) + +if __name__ == '__main__': + logging.info('-- Parsing input --')