Skip to content

Update docker.yml

Update docker.yml #2

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Docker build
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
# ¡Línea corregida para usar la ruta CI/Dockerfile y el contexto CI/!
run: docker build --platform linux --tag ${{ secrets.DOCKERHUB_USERNAME }}/backenddockerci:latest -f CI/Dockerfile CI/
- name: Push the Docker image
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/backenddockerci:latest