Public Access
1
0

fix registry authentication

This commit is contained in:
2026-04-24 21:51:09 +02:00
parent 4a66d2b26d
commit 201c1568df
2 changed files with 21 additions and 26 deletions
+13 -20
View File
@@ -10,6 +10,12 @@ inputs:
Tags to apply and push. Supports newline, comma, or space separated values.
Example: "latest\nsha-abc123"
required: true
registry-username:
description: Registry username for login.
required: true
registry-password:
description: Registry password for login.
required: true
context:
description: Build context path.
required: false
@@ -24,10 +30,6 @@ inputs:
Example: "ACT_RUNNER_VERSION=0.2.11"
required: false
default: ""
push:
description: Push image tags after build.
required: false
default: "true"
runs:
using: composite
@@ -70,18 +72,14 @@ runs:
run: |
set -euo pipefail
if [[ -n "${{ secrets.REGISTRY_USERNAME }}" && -n "${{ secrets.REGISTRY_PASSWORD }}" ]]; then
podman_args=(
--root "${PODMAN_ROOT}"
--runroot "${PODMAN_RUNROOT}"
--storage-driver "${STORAGE_DRIVER}"
)
podman_args=(
--root "${PODMAN_ROOT}"
--runroot "${PODMAN_RUNROOT}"
--storage-driver "${STORAGE_DRIVER}"
)
echo "Logging in to registry: registry.noctrl.eu"
echo "${{ secrets.REGISTRY_PASSWORD }}" | podman "${podman_args[@]}" login registry.noctrl.eu -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
else
echo "Registry credentials not available (REGISTRY_USERNAME and REGISTRY_PASSWORD secrets required for push)"
fi
echo "Logging in to registry: registry.noctrl.eu"
echo "${{ inputs.registry-password }}" | podman "${podman_args[@]}" login registry.noctrl.eu -u "${{ inputs.registry-username }}" --password-stdin
- id: build
shell: bash
@@ -118,11 +116,6 @@ runs:
run: |
set -euo pipefail
if [[ "${{ inputs.push }}" != "true" ]]; then
echo "Push disabled by input push=${{ inputs.push }}"
exit 0
fi
podman_args=(
--root "${PODMAN_ROOT}"
--runroot "${PODMAN_RUNROOT}"