-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (34 loc) · 1.28 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: EscolaService-Release
on:
push:
tags:
- 'v*'
pull_request:
types: [closed]
jobs:
generate-release:
runs-on: ubuntu-latest
steps:
- name: Get file name
id: name
run: echo "::set-output name=file_name::fga-eps-mds-2023.1-Dnit-EscolaService-$(TZ='America/Sao_Paulo' date +'%m-%d-%Y-%H-%M-%S')-${{github.ref_name}}"
- name: Copy repository
uses: actions/checkout@v2
- 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: ${{ steps.name.outputs.file_name }}.json
- name: Send metrics to doc repo
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}
with:
source_file: ${{ steps.name.outputs.file_name }}.json
destination_repo: 'fga-eps-mds/2023.1-Dnit-DOC'
destination_folder: 'analytics-raw-data'
user_email: ${{ secrets.GIT_EMAIL}}
user_name: ${{ secrets.GIT_USER }}
commit_message: Métricas automáticas da release ${{github.ref_name}} - ${{ github.event.repository.name }}