Skip to content

Commit

Permalink
Add shell script to docker group to access docker daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
yash22arora committed May 16, 2024
1 parent fd9c79f commit 94330a6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ jobs:
#!/bin/bash
set -e
# Ensure the user is added to the docker group
sudo usermod -aG docker $(whoami)
# Log out and back in to apply the group change
newgrp docker <<EONG
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker pull ${{ secrets.DOCKER_USERNAME }}/${{secrets.DOCKER_IMAGE_NAME}}:latest
Expand Down

0 comments on commit 94330a6

Please sign in to comment.