#1 : Publish generic package to gitea #2

Merged
devastator merged 36 commits from feature/1-publish into master 2026-09-28 01:07:59 +03:00
2 changed files with 29 additions and 1 deletions
Showing only changes of commit a3dadea932 - Show all commits
+11 -1
View File
@@ -17,4 +17,14 @@ jobs:
file: text.txt
package: a-proper-test-package
version: master
force: false
- uses: https://source.vague.tech/open-vague/ci-actions/publish@feature/1-publish
with:
file: text.txt
package: a-proper-test-package
version: master
force: true
- uses: https://source.vague.tech/open-vague/ci-actions/publish@feature/1-publish
with:
file: text.txt
package: a-proper-test-package
version: master
+18
View File
@@ -14,12 +14,30 @@ inputs:
force:
description: force package replacement keeping the same version
required: false
default: "false"
runs:
using: composite
steps:
- shell: bash
run: |
set -euo pipefail
if [[ "${INPUT_FORCE,,}" == "true" ]]; then
status="$(
curl --silent --show-error --output /dev/null --write-out '%{http_code}' \
--user "acti-bot:${ACTI_BOT_TOKEN}" \
--request DELETE \
"${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/${{ inputs.package }}/${{ inputs.version }}"
)"
case "$status" in
204|404) ;;
*)
echo "Failed to delete existing package version (HTTP ${status})" >&2
exit 1
;;
esac
fi
curl --fail-with-body \
--user "acti-bot:${ACTI_BOT_TOKEN}" \
--upload-file ${{ inputs.file }} \