name: Docker Push description: Push Docker image to Forgejo Packages registry inputs: image: description: Full image name (registry/org/name) required: true tags: description: Comma-separated list of tags to push default: 'latest' registry: description: Registry URL default: 'git.flowmade.one' username: description: Registry username default: ${{ github.repository_owner }} password: description: Registry password/token required: true runs: using: composite steps: - shell: bash run: | IMAGE="${{ inputs.image }}" TAGS="${{ inputs.tags }}" REGISTRY="${{ inputs.registry }}" USERNAME="${{ inputs.username }}" PASSWORD="${{ inputs.password }}" # Login to registry echo "$PASSWORD" | docker login "$REGISTRY" -u "$USERNAME" --password-stdin # Push each tag IFS=',' read -ra TAG_ARRAY <<< "$TAGS" for tag in "${TAG_ARRAY[@]}"; do tag=$(echo "$tag" | xargs) # trim whitespace echo "Pushing $IMAGE:$tag" docker push "$IMAGE:$tag" done