Tratando existência do getMetadata ao usar getTermsByOpportunity #16
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: CICD_HOMOLOG | |
on: | |
pull_request: | |
branches: | |
- homolog | |
types: | |
- closed | |
workflow_dispatch: | |
jobs: | |
BUILD: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Read version file | |
id: get_version | |
run: | | |
VERSION=$(cat version.txt) | |
echo "app_version=$VERSION" >> $GITHUB_ENV | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Criação da Imagem docker | |
uses: docker/[email protected] | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: | | |
secultceara/mapasculturais:homolog | |
secultceara/mapasculturais:${{ env.app_version }}-rc | |
DEPLOY: | |
needs: BUILD | |
runs-on: mapahomolog | |
steps: | |
- name: Pull da imagem do dockerhub | |
run: sudo docker pull secultceara/mapasculturais:homolog | |
- name: Restart do docker-compose para atualizar o container com a nova imagem | |
run: cd /opt/docker/mapa5 && sudo docker-compose down && sudo docker-compose up -d |