diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml new file mode 100644 index 0000000..6d78d03 --- /dev/null +++ b/.github/workflows/dockerhub.yml @@ -0,0 +1,25 @@ +name: Push to DockerHub + +on: + push: + branches: [master] + +jobs: + dockerhub: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - uses: satackey/action-docker-layer-caching@v0.0.5 + + - name: Build and push Docker images + uses: docker/build-push-action@v1.1.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: ${{ github.event.repository.full_name }} + tag_with_sha: true + tags: latest + dockerfile: Dockerfile