Skip to content

Commit

Permalink
👷 fix: login in non TTY using echo
Browse files Browse the repository at this point in the history
  • Loading branch information
synoti21 authored Oct 1, 2023
1 parent 2a195b6 commit a00f1f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: build and release to DockerHub
- name: Build and release to DockerHub
run: |
docker build -t ${{ secrets.PROJECT_NAME }} .
docker tag ${{ secrets.PROJECT_NAME }}:latest ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:latest
Expand All @@ -71,7 +71,7 @@ jobs:
key: ${{ secrets.EC2_KEY }}

script: |
sudo docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin ${{ secrets.DOCKERHUB_TOKEN }}
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
sudo docker kill ${{ secrets.PROJECT_NAME }}
sudo docker rm -f ${{ secrets.PROJECT_NAME }}
sudo docker rmi ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}
Expand Down

0 comments on commit a00f1f2

Please sign in to comment.