Skip to content

Workflow file for this run

name: Get daily stats
on:
#schedule:
# - cron: "0 0 * * *"
push:
branches: [ "*" ]
jobs:
cron:
runs-on: ubuntu-latest
steps:
- name: Git clone
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
# - name: Fetch
# env:
# PAT: ${{ secrets.PAT }}
# shell: bash
# run: ./scripts/fetch.sh
- name: Score
env:
PAT: ${{ secrets.PAT }}
shell: bash
run: |
./scripts/score.sh data/05-03-2024 data/26-02-2024
sort -nr score-output > data/05-03-2024
current_date=$(date +%s)
seven_days=$((7 * 24 * 60 * 60))
seven_days_ago=$((current_date - seven_days))
seven_days_ago_date=$(date -d "@$seven_days_ago" +%Y-%m-%d)
echo "Seven days ago: $seven_days_ago_date"
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: GitHub Commit & Push
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}