Update docker-publish.yml

This commit is contained in:
Jose Jimenez
2025-06-01 21:51:17 +02:00
committed by GitHub
parent d1ba8e06d8
commit 3afac4db07

View File

@@ -3,7 +3,7 @@ name: Build and Publish Docker Image
on:
push:
branches:
- main # Trigger on pushes to the 'main' branch
- main
workflow_dispatch: # Allow manual triggering of the workflow
jobs:
@@ -11,23 +11,19 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Log in to Docker Hub using GitHub credentials
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build the Docker image
- name: Build Docker Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/hl-server:latest .
# Push the Docker image to Docker Hub
- name: Push Docker Image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/hl-server:latest