mirror of
https://github.com/sstent/NYT_Sudoku.git
synced 2026-01-26 23:22:16 +00:00
29 lines
882 B
YAML
29 lines
882 B
YAML
name: Add row to data.csv
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# https://crontab.guru/every-day
|
|
- cron: "0 0 * * *"
|
|
jobs:
|
|
writeData:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout main branch
|
|
uses: actions/checkout@v2
|
|
- uses: gr2m/write-csv-file-action@v1.x
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
path: data/stats.csv
|
|
columns: Column 1, Column 2, etc
|
|
"Column 1": 1
|
|
"Column 2": 2
|
|
etc: 3
|
|
- run: git config --local user.email "action@github.com"
|
|
- run: git config --local user.name "GitHub Action"
|
|
- run: git add data
|
|
- run: git commit -m "data/stats.csv updated"
|
|
- run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|