adicionando o .env #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 Docker Image | |
on: | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Etapa 1: Checkout do código | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Etapa 2: Configurar Docker Buildx | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
# Etapa 3: Login no GitHub Container Registry (GHCR) | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: rodrigor | |
password: ${{ secrets.GHCR_TOKEN }} | |
# Etapa 4: Construir e enviar a imagem Docker para o GHCR | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: ghcr.io/rodrigor/evite_o_golpe_web:latest | |
# Etapa 5: Logout do GHCR | |
- name: Log out from GitHub Container Registry | |
run: docker logout ghcr.io | |
# Etapa 6: Gatilho para implantar no Portainer | |
#- name: Trigger Portainer Deployment | |
# run: curl -X POST ${{ secrets.PORTAINER_ESPRESSO_BOT_WEBHOOK_URL }} |