Update Awesome Go stats #526
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Awesome Go stats | |
on: | |
schedule: | |
- cron: "0 3 * * *" # runs at 03:00 UTC everyday | |
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.23.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 |