testando alteração na pasta app para verificar script github actions #8
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: Continuous delivery and deploy into AWS Cloud provider | |
# Será executada as atividade abaixo sempre que foi submetido um push ou pull request a branch master | |
# ou de forma manual | |
on: | |
push: | |
branches: [main, develop] | |
paths: | |
- "app/**" | |
pull_request: | |
branches: [main, develop] | |
paths: | |
- "app/**" | |
jobs: | |
continuous-delivery: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Build container images for different platforms from a single build context | |
- 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 using a specific tag version | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./app | |
push: true | |
tags: samuel1797/desafio-devops:1.0 | |
- name: Build and push using the latest tag version | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./app | |
push: true | |
tags: samuel1797/desafio-devops:latest |