Skip to content

Commit aee4150

Browse files
authored
fixing the reading the docker credentials from github action (#543)
1 parent cc62710 commit aee4150

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/webhook-build.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ jobs:
3838
3939
- name: Build and push webhook images to registry
4040
if: ${{ github.event_name != 'pull_request' }}
41+
env:
42+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
43+
DOCKER_SECRET: ${{ secrets.DOCKER_SECRET }}
4144
run: |
4245
echo "Building and pushing both webhook images to registry..."
43-
echo "${{ secrets.DOCKER_SECRET }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
46+
if [ -z "$DOCKER_USERNAME" ]; then echo "USERNAME is empty"; fi
47+
if [ -z "$DOCKER_SECRET" ]; then echo "SECRET is empty"; fi
48+
echo "$DOCKER_SECRET" | docker login -u "$DOCKER_USERNAME" --password-stdin
4449
cd helpers
4550
make docker-push-all
4651
echo "Both webhook images built and pushed successfully!"

0 commit comments

Comments
 (0)