feat: 改成 docker action

This commit is contained in:
Jeffery
2026-03-20 14:18:53 +08:00
parent 0d7cdd65ca
commit ea8b72ce8f
3 changed files with 29 additions and 27 deletions

16
entrypoint.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
GITEA_SERVER="${INPUT_GITEA_SERVER}"
REPOSITORY="${INPUT_REPOSITORY}"
PACKAGE_NAME="${INPUT_PACKAGE_NAME:-}"
TOKEN="${INPUT_TOKEN}"
KEEP_COUNT="${INPUT_KEEP_COUNT:-2}"
DRY_RUN="${INPUT_DRY_RUN:-false}"
/cleanup-releases.sh "$GITEA_SERVER" "$REPOSITORY" "$TOKEN" "$KEEP_COUNT" "$DRY_RUN"
if [[ -n "$PACKAGE_NAME" ]]; then
/cleanup-images.sh "$GITEA_SERVER" "$REPOSITORY" "$PACKAGE_NAME" "$TOKEN" "$KEEP_COUNT" "$DRY_RUN"
fi