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:
|
env:
|
||||||
REGISTRY: git.mischlabs.de
|
REGISTRY: git.mischlabs.de
|
||||||
|
REGISTRY_USER: MrDiderot
|
||||||
REGISTRY_IMAGE: git.mischlabs.de/mrdiderot/michess
|
REGISTRY_IMAGE: git.mischlabs.de/mrdiderot/michess
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -46,7 +44,12 @@ jobs:
|
|||||||
- name: Log in to Gitea Package Registry
|
- name: Log in to Gitea Package Registry
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
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
|
- name: Build and push Docker image
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|||||||
Reference in New Issue
Block a user