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
|
||||
env:
|
||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$REGISTRY_USERNAME" ] || [ -z "$REGISTRY_TOKEN" ]; then
|
||||
if [ -z "$REGISTRY_USER" ] || [ -z "$REGISTRY_TOKEN" ]; then
|
||||
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."
|
||||
exit 1
|
||||
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
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
Reference in New Issue
Block a user