Skip to content

Commit

Permalink
API-337 | Add build push Docker image workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Magtoto committed Nov 20, 2023
1 parent 91b56f8 commit 079808c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-image-on-push-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Build image on push to master'
run-name: Build image on push to master by @${{ github.actor }}

on:
push:
branches:
- master

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"

0 comments on commit 079808c

Please sign in to comment.