feat: workflow to create coverage.xml file #6
Workflow file for this run
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: 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." |