Skip to content

Commit

Permalink
fix: Use GitHub credentials for docker-publish CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Oct 6, 2021
1 parent 73ad1fa commit a5f5605
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
run : make travis_docker_push
run : make docker_push
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ dev.stop: # Stops containers so they can be restarted
app-shell: # Run bash in the container as root
docker exec -u 0 -it edx.devstack.xblock-sdk bash

travis_docker_auth:
echo "$$DOCKER_PASSWORD" | docker login -u "$$DOCKER_USERNAME" --password-stdin
docker_auth:
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin

travis_docker_tag: docker_build
docker tag "openedx/xblock-sdk:latest" "openedx/xblock-sdk:$$TRAVIS_COMMIT"
docker_tag: docker_build
docker tag "openedx/xblock-sdk:latest" "openedx/xblock-sdk:${GITHUB_SHA}"

travis_docker_push: | travis_docker_auth travis_docker_tag ## push to docker hub
echo "$$TRAVIS_COMMIT"
docker_push: | docker_auth docker_tag ## push to docker hub
echo "${GITHUB_SHA}"
docker images
docker -l debug push "openedx/xblock-sdk:latest"
docker -l debug push "openedx/xblock-sdk:$$TRAVIS_COMMIT"
docker -l debug push "openedx/xblock-sdk:${GITHUB_SHA}"

0 comments on commit a5f5605

Please sign in to comment.