Skip to content

Added Gihub Action Docker build and push to DockerHub (#16) #24

Added Gihub Action Docker build and push to DockerHub (#16)

Added Gihub Action Docker build and push to DockerHub (#16) #24

name: Generate Docker Image and Publish
on:
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: laurocorreia/reactive-api:latest