Skip to content

Commit 7b46233

Browse files
committed
fix: update Docker login command to use password-stdin for improved security
1 parent 69c7d71 commit 7b46233

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,9 @@ jobs:
185185
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ssh_key.pem
186186
chmod 600 ssh_key.pem
187187
188-
# Export variables for SSH session
189-
export DOCKER_REGISTRY
190-
export DOCKER_USERNAME
191-
export DOCKER_PASSWORD
192-
193188
ssh -o StrictHostKeyChecking=no -i ssh_key.pem opc@${ORACLE_VM_IP} << ENDSSH
194189
cd ~/music-analytics/vm-deploy || exit 1
195-
docker login \${DOCKER_REGISTRY} -u \${DOCKER_USERNAME} -p \${DOCKER_PASSWORD} || exit 1
190+
echo "\${DOCKER_PASSWORD}" | docker login \${DOCKER_REGISTRY} -u \${DOCKER_USERNAME} --password-stdin || exit 1
196191
docker-compose pull || exit 1
197192
docker-compose up -d || exit 1
198193
docker logout \${DOCKER_REGISTRY}

0 commit comments

Comments
 (0)