forked from fga-eps-mds/2024-1-GEROcuidado-Front
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.44 KB
/
metrics.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
46
name: Export de métricas
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
types: [closed]
jobs:
release:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Criar diretório
run: mkdir analytics-raw-data
- name: Coletar métricas no SonarCloud
run: python parser.py fga-eps-mds_2024-2-GEROcuidado-Front ${{ 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/2024-2-GEROcuidado-Docs" 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/upload-release-assets@v2.0
with:
files: 'analytics-raw-data/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}