Skip to content

Push to Docker Hub

Push to Docker Hub #28

# This build will build and push the image to docker hub upon a commit to the
# main branch only
name: Push to Docker Hub
on: workflow_dispatch
jobs:
build-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push image
id: website_docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: earthlab/r-python-eds-lessons-env:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Build and push image
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: earthlab/earth-analytics-dev-env:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}