-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (40 loc) · 1.23 KB
/
main.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
38
39
40
41
42
43
44
45
46
47
48
49
name: update-usage-statistics
on:
push:
branches: master
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
build-update-usage-statistics:
runs-on: ubuntu-latest
steps:
- name: checkout-repository
uses: actions/checkout@v3
- name: add-short-sha
shell: bash
run: |
echo "git_short_sha=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: setup-google-api
shell: bash
run: |
pip install --upgrade pip
pip install --upgrade google-api-python-client
pip3 install --upgrade oauth2client
pip install connect
pip install functions
- name: download-ga-data
shell: bash
env:
GA_SECRET: ${{ secrets.GA_SECRET}}
run: |
echo "$GA_SECRET" > ga_key.txt
python scripts/ga-getdata.py ga_key.txt > gaData.csv
git config user.name 'GitHub update-usage-statistics action'
git config user.email '[email protected]'
git commit --allow-empty-message -m '' gaData.csv
git push