Skip to content

Commit

Permalink
teste
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriqueAmorim20 committed Oct 24, 2023
1 parent ff7c7ac commit 2d42677
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
file: ./docker-compose.prod.yml
file: ./Dockerfile.prod
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Export de métricas
# name: Export de métricas

on:
push:
branches: [main, develop]
tags:
- "v*"
# on:
# push:
# branches: [main, develop]
# tags:
# - "v*"

jobs:
release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Criar diretório
run: mkdir analytics-raw-data
# jobs:
# release:
# runs-on: "ubuntu-latest"
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Criar diretório
# run: mkdir analytics-raw-data

- name: Coletar métricas no SonarCloud
run: python parser.py ${{ github.event.repository.name }} ${{ github.ref_name }}
# - name: Coletar métricas no SonarCloud
# run: python parser.py ${{ github.event.repository.name }} ${{ github.ref_name }}

- name: Envia métricas para repo de Doc
run: |
git config --global user.email "${{secrets.USER_EMAIL}}"
git config --global user.name "${{secrets.USER_NAME}}"
git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_DOC}}@github.com/fga-eps-mds/2023-2-GEROcuidado-Doc" docs
mkdir -p docs/analytics-raw-data
cp -R analytics-raw-data/*.json docs/analytics-raw-data
cd docs/
git add .
git commit -m "Adicionando métricas do repositório ${{ github.event.repository.name }} ${{ github.ref_name }}"
git push
# - name: Envia métricas para repo de Doc
# run: |
# git config --global user.email "${{secrets.USER_EMAIL}}"
# git config --global user.name "${{secrets.USER_NAME}}"
# git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_DOC}}@github.com/fga-eps-mds/2023-2-GEROcuidado-Doc" docs
# mkdir -p docs/analytics-raw-data
# cp -R analytics-raw-data/*.json docs/analytics-raw-data
# cd docs/
# git add .
# git commit -m "Adicionando métricas do repositório ${{ github.event.repository.name }} ${{ github.ref_name }}"
# git push

- name: Envia métricas como assets da release
if: startsWith(github.ref, 'refs/tags')
uses: AButler/[email protected]
with:
files: 'analytics-raw-data/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
# - name: Envia métricas como assets da release
# if: startsWith(github.ref, 'refs/tags')
# uses: AButler/[email protected]
# with:
# files: 'analytics-raw-data/*'
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# release-tag: ${{ github.ref_name }}
12 changes: 12 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
FROM postgres:13.3

RUN usermod -u 1000 postgres

RUN localedef -i pt_BR -c -f UTF-8 -A /usr/share/locale/locale.alias pt_BR.UTF-8
ENV LANG pt_BR.utf8
ENV LC_ALL pt_BR.utf8
ENV LANGUAGE pt_BR.utf8

EXPOSE 5001

FROM node:18.13.0 AS BUILD_IMAGE

WORKDIR /home/node/app
Expand Down Expand Up @@ -38,3 +49,4 @@ USER node

EXPOSE 3001
ENTRYPOINT ["/app/entrypoint.sh"]

0 comments on commit 2d42677

Please sign in to comment.