Create docker-image.yml

This commit is contained in:
fcarraUniSa
2025-12-23 10:54:10 +01:00
committed by GitHub
parent 753d8c4ab1
commit 383c11f148

34
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Build and push to Docker Hub
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@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@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
TUOUSER/emailmanager:latest
TUOUSER/emailmanager:${{ github.sha }}