Skip to content

📚 docs: atualizando documentação #53

📚 docs: atualizando documentação

📚 docs: atualizando documentação #53

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./backend/grupos-partidas-apis
file: ./backend/grupos-partidas-apis/Dockerfile
push: true
tags: ruanfk2023/grupos-partidas-apis:latest
- name: Pull and tag the Docker image
run: |
docker pull ruanfk2023/grupos-partidas-apis
docker tag ruanfk2023/grupos-partidas-apis grupos-partidas-apis:$(date +%s)
- name: Build and push Frontend docker image
uses: docker/build-push-action@v2
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ruanfk2023/frontend:latest
- name: Pull and tag the Docker image
run: |
docker pull ruanfk2023/frontend
docker tag ruanfk2023/frontend frontend:$(date +%s)
- name: Build Docker image for testing
uses: docker/build-push-action@v2
with:
context: ./backend/grupos-partidas-apis
file: ./backend/grupos-partidas-apis/Dockerfile # Use a separate Dockerfile for testing.
tags: ruanfk2023/grupos-partidas-apis:latest
- name: Run unit tests in Docker container
run: |
docker run --rm ruanfk2023/grupos-partidas-apis:latest mvn test # Run the tests inside the container.
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: 'botafogo'
slot-name: 'production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./backend/grupos-partidas-apis