-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 968 Bytes
/
ran_today.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
name: Run Today
on:
push:
branches:
- main
# run every day at 4am UTC which is 11pm EST
# TODO: does that work correctly for daylight savings?
schedule:
- cron: "0 3 * * *"
# set environment variables from github secrets
env:
GARMIN_TOKENS: ${{ secrets.GARMIN_TOKENS }}
# allow action to push to repo
permissions:
contents: write
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- name: Configure Git
run: |
git config --global user.email "ian@beckr.dev"
git config --global user.name "Ian Becker"
- name: Check if I ran today and update streak.json
run: |
nix develop --impure --command just ran
- name: Commit streak to GitHub if it changed
run: |
git diff --quiet HEAD -- streak.json || (git commit -m "chore: updates streak.json" streak.json && git push origin main)