Use registry PAT for Gitea Docker login
Some checks failed
Build & Push Docker Image to Gitea Registry / build-and-push (push) Failing after 6m15s
Some checks failed
Build & Push Docker Image to Gitea Registry / build-and-push (push) Failing after 6m15s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user