Skip to content

Commit

Permalink
Merge pull request #3 from fga-eps-mds/sonar_organization_update
Browse files Browse the repository at this point in the history
chore: use organization secrets
  • Loading branch information
Matheusafonsouza authored Dec 7, 2024
2 parents b3d9a13 + 28cf3d0 commit 488c53a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.LIVRO_LIVRE_SONAR_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ jobs:
- name: Cria arquivo .env
run: |
touch ./sonar_scripts/.env
echo GITHUB_TOKEN=${{ secrets.API_TOKEN_GITHUB }} >> ./sonar_scripts/.env
echo GITHUB_TOKEN=${{ secrets.LIVRO_LIVRE_API_TOKEN_GITHUB }} >> ./sonar_scripts/.env
echo RELEASE_MAJOR=${{ contains(github.event.pull_request.labels.*.name, 'MAJOR RELEASE') }} >> ./sonar_scripts/.env
echo RELEASE_MINOR=${{ contains(github.event.pull_request.labels.*.name, 'MINOR RELEASE') }} >> ./sonar_scripts/.env
echo RELEASE_FIX=${{ contains(github.event.pull_request.labels.*.name, 'FIX RELEASE') }} >> ./sonar_scripts/.env
echo DEVELOP=${{ contains(github.event.pull_request.labels.*.name, 'DEVELOP') }} >> ./sonar_scripts/.env
echo REPO=${{ github.event.repository.name }} >> ./sonar_scripts/.env
echo REPO_DOC=${{ secrets.REPO_DOC }} >> ./sonar_scripts/.env
echo REPO_DOC=${{ secrets.LIVRO_LIVRE_REPO_DOC }} >> ./sonar_scripts/.env
- name: Criar diretório
run: mkdir -p analytics-raw-data
- name: Coletar métricas no SonarCloud
run: python ./sonar_scripts/parser.py
- name: Envia métricas para repo de Docs
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_GITHUB }}@github.com/fga-eps-mds/${{ secrets.REPO_DOC }}" doc
git config --global user.email "${{secrets.LIVRO_LIVRE_USER_EMAIL}}"
git config --global user.name "${{secrets.LIVRO_LIVRE_USER_NAME}}"
git clone --single-branch --branch main "https://x-access-token:${{ secrets.LIVRO_LIVRE_API_TOKEN_GITHUB }}@github.com/fga-eps-mds/${{ secrets.LIVRO_LIVRE_REPO_DOC }}" doc
mkdir -p doc/analytics-raw-data
cp -R analytics-raw-data/*.json doc/analytics-raw-data
cd doc
Expand Down

0 comments on commit 488c53a

Please sign in to comment.