Use registry PAT for Gitea Docker login
Some checks failed
Build & Push Docker Image to Gitea Registry / build-and-push (push) Failing after 6m15s

This commit is contained in:
Kroonk
2026-05-20 17:28:17 +02:00
parent 37e2495e3d
commit c9919479bf

View File

@@ -6,14 +6,12 @@ on:
env:
REGISTRY: git.mischlabs.de
REGISTRY_USER: MrDiderot
REGISTRY_IMAGE: git.mischlabs.de/mrdiderot/michess
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -46,7 +44,12 @@ jobs:
- name: Log in to Gitea Package Registry
shell: sh
run: |
echo "${{ gitea.token }}" | docker login "${{ env.REGISTRY }}" -u "${{ gitea.actor }}" --password-stdin
if [ -z "${{ secrets.REGISTRY_TOKEN }}" ]; then
echo "Missing REGISTRY_TOKEN secret."
echo "Create a Gitea personal access token for MrDiderot with package Read and Write permission."
exit 1
fi
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY }}" -u "${{ env.REGISTRY_USER }}" --password-stdin
- name: Build and push Docker image
shell: sh