Skip to content

Commit

Permalink
Create build_push_docker_hub.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardovida authored Mar 11, 2021
1 parent d6aab9a commit 7395396
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build_push_docker_hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Publish Docker image
name: Publish Docker image on Docker Hub

on:
push:
branches:
- 'main'
- 'master'

jobs:
push_to_docker_hub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker base
uses: docker/build-push-action@v2 # https://github.com/docker/build-push-action
with:
context: docker/docker_base
push: true
tags: ${{ secrets.DOCKER_HUB_REPOSITORY }}/docker_base:latest

0 comments on commit 7395396

Please sign in to comment.