Try to allow to use this repository as Forgejo Action
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Benjamin Renard 2024-03-10 17:07:47 +01:00
parent 0b15f1c2a8
commit a8b8d7e5d5

51
action.yml Normal file
View file

@ -0,0 +1,51 @@
---
name: "Publish Debian package on a Aptly repository"
author: "Benjamin Renard <brenard@zionetrix.net>"
description: "Publish one (or more) Debian package on a Aptly repository using its API"
inputs:
api_url:
description: "Your Aptly API URL"
required: true
api_username:
description: "Username to authenticate on your Aptly API"
required: true
api_password:
description: "Password to authenticate on your Aptly API"
required: true
prefix:
description: "The publishing prefix"
default: "."
repo_component:
description: "The component name to publish on"
default: "main"
repo_name:
description: "The repository name to publish on. If not specified, it will be computed using the specified prefix and component and the detected package distribution. See doc for details."
path:
description: "Path to the directory where files to publish are stored"
default: "dist"
source_name:
description: "Name of the source package to publish (optional, default: all changes files are will be publish)"
max_retries:
description: "The number of retry in case of error calling the Aptly API (optional, default: no retry)"
force_overwrite:
description: "When publishing, overwrite files in pool/ directory without notice"
default: false
runs:
using: "composite"
steps:
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: |
export API_URL="${{ inputs.api_url }}"
export API_USERNAME="${{ inputs.api_username }}"
export API_PASSWORD="${{ inputs.api_password }}"
export PREFIX="${{ inputs.prefix }}"
export REPO_COMPONENT="${{ inputs.repo_component }}"
export REPO_NAME="${{ inputs.repo_name }}"
export PATH="${{ inputs.path }}"
export SOURCE_NAME="${{ inputs.source_name }}"
export MAX_RETRIES="${{ inputs.max_retries }}"
export FORCE_OVERWRITE="${{ inputs.force_overwrite }}"
aptly-publish
shell: bash