Skip to content

Update README.md

Update README.md #75

name: Build and push to Dockerhub
on: [push, pull_request]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the Docker image
if: github.ref == 'refs/heads/develop'
run: |
docker build . \
--file ./Dockerfile \
--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/${{ secrets.DOCKER_HUB_REPOSITORY }}:latest
- name: Login to docker registry
if: github.ref == 'refs/heads/develop'
run: docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Push to docker registry
if: github.ref == 'refs/heads/develop'
run: docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/${{ secrets.DOCKER_HUB_REPOSITORY }}:latest