-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (28 loc) · 1.14 KB
/
release.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
name: Generate Metrics Release
on:
release:
types: [released]
pull_request:
types:
- closed
jobs:
send-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Criar diretório
run: mkdir analytics-raw-data
- name: Create Metrics SonarCloud
run: python3 metrics/sonar-metrics.py ${{ github.event.repository.name }} ${{ github.ref_name }}
- name: Commit Metrics SonarCloud File
run: |
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_GITHUB}}@github.com/fga-eps-mds/2023.2-SINDPOL-DOC" sindpol_docs_repo
mkdir -p sindpol_docs_repo/analytics-raw-data
cp -R analytics-raw-data/*.json sindpol_docs_repo/analytics-raw-data
cd sindpol_docs_repo
git add .
git commit -m "Gerando métricas SonarCloud - ${{ github.event.repository.name }} ${{ github.ref_name }}"
git push
echo "Metrics File Generated Successfully."