Skip to content

Weekly Archive

Weekly Archive #49

name: Weekly Archive
on:
schedule:
# Every 9 am UTC (4 am eastern) on Monday
# https://crontab.guru/#0_9_*_*_MON
- cron: "0 9 * * MON"
jobs:
get-time-range:
runs-on: ubuntu-latest
outputs:
start-date: ${{ steps.get-time-range.outputs.start-date }}
end-date: ${{ steps.get-time-range.outputs.end-date }}
steps:
- name: Get time range
id: get-time-range
run: |
start_date=$(date -d "last monday" -I)
end_date=$(date -d "last sunday" -I)
echo "$start_date"
echo "$end_date"
echo "start-date=$start_date" >> "$GITHUB_OUTPUT"
echo "end-date=$end_date" >> "$GITHUB_OUTPUT"
scheduled-run:
needs:
- get-time-range
uses: ./.github/workflows/run.yaml
with:
START_DATE: ${{ needs.get-time-range.outputs.start-date }}
END_DATE: ${{ needs.get-time-range.outputs.end-date }}
keepalive-job:
name: Keepalive Workflow
if: ${{ always() }}
needs: scheduled-run
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v4
- uses: gautamkrishnar/keepalive-workflow@v2
with:
use_api: true