From 8adf0e6e06f592083205245aff3a79231c7b0bf4 Mon Sep 17 00:00:00 2001 From: s3lph Date: Mon, 18 Dec 2023 23:55:49 +0100 Subject: [PATCH] feat: initial commit --- action.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..af46d5a --- /dev/null +++ b/action.yml @@ -0,0 +1,36 @@ +--- + +name: Debian Package Upload +description: Upload a Debian deb package to a Forgejo/Gitea package registry +inputs: + deb: + description: Path to the deb package. Can contain shell glob expressions. + default: "*.deb" + repository: + description: Forgejo/Gitea Debian repository URL. + default: "${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/debian" + distribution: + description: Repository distribution to upload to. + default: stable + component: + description: Repository component to upload to. + default: main + username: + description: The username with which to authenticate against the repository. + default: forgejo-actions + password: + description: The password with which to authenticate against the repository. + default: "${GITHUB_TOKEN}" +runs: + using: docker + image: docker.io/curlimages/curl:latest + entrypoint: /bin/sh + args: + - -c + - >- + curl + --user + "${{ inputs.username }}:${{ inputs.password }}" + --upload-file + ${{ inputs.deb }} + "${{ inputs.repository }}/pool/${{ inputs.distribution }}/${{ inputs.component }}/upload"