Skip to content

Merge pull request #8 from fga-eps-mds/develop #15

Merge pull request #8 from fga-eps-mds/develop

Merge pull request #8 from fga-eps-mds/develop #15

Workflow file for this run

name: Generate Metrics Release
on:
push:
branches: [main, develop]
tags:
- "v*"
jobs:
send-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Create Metrics SonarCloud
run: python metrics/sonar-metrics.py ${{ github.event.repository.name }} ${{ github.ref_name }}
- name: Commit Metrics SonarCloud File
run: |
git config --global user.email "${{ secrets.USER_EMAIL }}"
git config --global user.name "${{ secrets.USER_USERNAME }}"
git clone --single-branch --branch main "https://x-access-token:${{ secrets.PERSONAL_TOKEN }}@github.com/fga-eps-mds/2023-1-Schedula-Doc" docs
mkdir -p docs/analytics-raw-data
cp -R fga-eps-mds*.json docs/analytics-raw-data
cd docs
git add .
git commit -m "Métricas SonarCloud - ${{ github.event.repository.name }} ${{ github.ref_name }}"
git push
echo "Metrics File Generated Successfully."