Skip to content

Build image on push to master by @John-Magtoto #1

Build image on push to master by @John-Magtoto

Build image on push to master by @John-Magtoto #1

name: 'Build image on push to master'
run-name: Build image on push to master by @${{ github.actor }}
on:
push:
branches:
- master
- feature/API-337
jobs:
build_image:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: |
"vocovo/docker-mosquitto:${{ github.sha }}"
"vocovo/docker-mosquitto:latest"