Skip to content

Commit

Permalink
Create metrics.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoGurgel authored Oct 18, 2023
1 parent a713020 commit c37b5ec
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Export de métricas

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

- 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" doc
mkdir -p doc/analytics-raw-data
cp -R analytics-raw-data/*.json doc/analytics-raw-data
cd doc/
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 }}

0 comments on commit c37b5ec

Please sign in to comment.