-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.17 KB
/
update-stats.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
name: Update Awesome python stats
on:
schedule:
- cron: "0 19 * * 1" # every Monday at 19:00 UTC
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22.3"
- name: Install dependencies
run: go get .
- name: Run
run: go run main.go
env:
PAT: ${{ secrets.PAT }}
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}
OTEL_SERVICE_NAME: ${{ vars.OTEL_SERVICE_NAME }}
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }}
FILE_SUFFIX: "latest"
- name: Set last update date
run: |
current_day=$(date +"%Y-%m-%d")
echo "${current_day}" > "last-update.txt"
- name: Push generated files to the repo
uses: stefanzweifel/git-auto-commit-action@v5
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: generated-stats-csv
path: |
./*.csv
./last-update.txt