Skip to content

Add GitHub Actions workflow to build Docker image #1

Add GitHub Actions workflow to build Docker image

Add GitHub Actions workflow to build Docker image #1

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest # Native AMD64
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: benitezhm/my_app:latest,benitezhm/my_app:${{ github.sha }}