diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9877b3..14b243a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,34 +11,34 @@ jobs: steps: - name: Get file name id: name - run: echo "::set-output name=file_name::fga-eps-mds-2021-2-Cartografia-social-api-gateway-$(TZ='America/Sao_Paulo' date +'%m-%d-%Y-%H-%M')-${{github.ref_name}}" + run: echo "::set-output name=file_name::fga-eps-mds-2021-2-Cartografia-social-api-gateway-$(TZ='America/Sao_Paulo' date +'%m-%d-%Y-%H-%M-%S')-${{github.ref_name}}" - name: Copy repository uses: actions/checkout@v2 - - run: mkdir -p /tmp/sonar/ - - run: curl -4 --location --request POST $METRICS_URL > /tmp/sonar/${{ steps.name.outputs.file_name }}.json + - run: wget $METRICS_URL -O ${{ steps.name.outputs.file_name }}.json env: METRICS_URL: ${{ secrets.METRICS_URL }} - uses: actions/upload-artifact@v2 with: name: ${{ steps.name.outputs.file_name }}.json - path: /tmp/sonar/${{ steps.name.outputs.file_name }}.json + path: ${{ steps.name.outputs.file_name }}.json - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: true files: | - /tmp/sonar/${{ steps.name.outputs.file_name }}.json - + ${{ steps.name.outputs.file_name }}.json + - name: Send metrics to docs repo uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 env: API_TOKEN_GITHUB: ${{ secrets.GIT_TOKEN }} with: - source_file: /tmp/sonar/${{ steps.name.outputs.file_name }}.json + source_file: ${{ steps.name.outputs.file_name }}.json destination_repo: 'fga-eps-mds/2021-2-Cartografia-social-Doc' destination_folder: 'analytics-raw-data/2021-2-Cartografia-social-api-gateway' user_email: ${{ secrets.GIT_EMAIL}} user_name: ${{ secrets.GIT_USER }} commit_message: New metrics from ${{ github.event.repository.name }} + +