Use existing registry user secret
Some checks failed
Build & Push Docker Image / build-and-push (push) Failing after 6m45s
Some checks failed
Build & Push Docker Image / build-and-push (push) Failing after 6m45s
This commit is contained in:
8
.github/workflows/docker-build.yml
vendored
8
.github/workflows/docker-build.yml
vendored
@@ -46,17 +46,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Log in to package registry
|
- name: Log in to package registry
|
||||||
env:
|
env:
|
||||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$REGISTRY_USERNAME" ] || [ -z "$REGISTRY_TOKEN" ]; then
|
if [ -z "$REGISTRY_USER" ] || [ -z "$REGISTRY_TOKEN" ]; then
|
||||||
echo "Missing registry credentials."
|
echo "Missing registry credentials."
|
||||||
echo "Create repository secrets REGISTRY_USERNAME and REGISTRY_TOKEN."
|
echo "Create repository secrets REGISTRY_USER and REGISTRY_TOKEN."
|
||||||
echo "REGISTRY_TOKEN must be a Gitea access token with package write permission."
|
echo "REGISTRY_TOKEN must be a Gitea access token with package write permission."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USERNAME" --password-stdin
|
echo "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user