[fix:34] - fix benefits test #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: backend-beneficios-release | |
on: | |
push: | |
branches: [main] | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
- devel | |
types: [closed] | |
jobs: | |
generate-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: "Get Previous tag" | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
with: | |
fallback: 1.0.0 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Cria métricas do SonarCloud | |
run: python metrics/sonar-metrics.py ${{ github.event.repository.name }} ${{ github.ref_name }} | |
- name: Commita arquivos de métricas do SonarCloud | |
run: | | |
git config --global user.email "${{ secrets.GIT_EMAIL }}" | |
git config --global user.name "${{ secrets.GIT_USER }}" | |
git clone --single-branch --branch main "https://x-access-token:${{ secrets.PERSONAL_TOKEN }}@github.com/fga-eps-mds/2024.1-SENTINELA-DOC" doc | |
mkdir -p doc/analytics-raw-data | |
cp -R fga-eps-mds*.json doc/analytics-raw-data | |
cd doc | |
git add . | |
git commit -m "Métricas SonarCloud - ${{ github.event.repository.name }} ${{ github.ref_name }}" | |
git push | |
echo "Arquivos de métricas gerado com sucesso." |