Skip to content

Commit

Permalink
add year
Browse files Browse the repository at this point in the history
  • Loading branch information
malinkang committed Jan 13, 2024
1 parent fd6f550 commit a14ad5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/weread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
sync:
name: Sync
runs-on: ubuntu-latest
env:
YEAR: ${{ vars.YEAR }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -23,9 +25,12 @@ jobs:
- name: weread sync
run: |
python scripts/weread.py "${{secrets.WEREAD_COOKIE}}" "${{secrets.NOTION_TOKEN}}" "${{secrets.NOTION_DATABASE_ID}}" "${{ github.ref }}" "${{ github.repository }}" --styles 0 1 2 --colors 0 1 2 3 4 5
- name: Set default year if not provided
run: echo "YEAR=$(date +"%Y")" >> $GITHUB_ENV
if: env.YEAR == ''
- name: weread heatmap
run: |
github_heatmap weread --weread_cookie "${{secrets.WEREAD_COOKIE}}" --year $(date +"%Y") --me "${{secrets.NAME}}" --with-animation --background-color=${{ vars.background_color||'#FFFFFF'}} --track-color=${{ vars.track_color||'#ACE7AE'}} --special-color1=${{ vars.special_color||'#69C16E'}} --special-color2=${{ vars.special_color2||'#549F57'}} --dom-color=${{ vars.dom_color||'#EBEDF0'}} --text-color=${{ vars.text_color||'#000000'}}
github_heatmap weread --weread_cookie "${{secrets.WEREAD_COOKIE}}" --year $YEAR --me "${{secrets.NAME}}" --with-animation --background-color=${{ vars.background_color||'#FFFFFF'}} --track-color=${{ vars.track_color||'#ACE7AE'}} --special-color1=${{ vars.special_color||'#69C16E'}} --special-color2=${{ vars.special_color2||'#549F57'}} --dom-color=${{ vars.dom_color||'#EBEDF0'}} --text-color=${{ vars.text_color||'#000000'}}
- name: push
run: |
git config --local user.email "[email protected]"
Expand Down
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo $(date +"%Y")

0 comments on commit a14ad5e

Please sign in to comment.