Create tslint.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Backend Docker Image | |
on: | |
push: | |
branches: | |
- main # Ajusta esto según la rama que desees. | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: 'lenin.chavez' # Reemplaza por tu nombre de usuario real | |
password: 'password' # Reemplaza por tu contraseña real | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: lenin.chavez/backend:${{ github.sha }} # Asegúrate de que esto coincida con tu configuración en Docker Hub | |
- name: Clean up Buildx | |
uses: docker/build-push-action@v3 | |
with: | |
cleanup: true |