-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.12 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: ci
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: 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
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