Skip to content

Commit

Permalink
Update publishimage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Phipsiart authored Nov 22, 2024
1 parent 3745f31 commit 56037f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/publishimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

# Docker-Login mit Umgebungsvariablen (non-interaktiv)
# Docker-Login in die private Registry
- name: Log in to Docker Registry
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
run: |
echo "$DOCKER_PASSWORD" | docker login "$DOCKER_REGISTRY" -u "$DOCKER_USERNAME" --password-stdin
if [ -z "$DOCKER_USERNAME" ] || [ -z "$DOCKER_PASSWORD" ] || [ -z "$DOCKER_REGISTRY" ]; then
echo "Error: One or more Docker login variables are empty!"
exit 1
fi
echo "$DOCKER_PASSWORD" | docker login "$DOCKER_REGISTRY" --username "$DOCKER_USERNAME" --password-stdin
# Docker-Image bauen
- name: Build Docker Image
Expand Down

0 comments on commit 56037f2

Please sign in to comment.