Update Summaries Daily #1147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Summaries Daily | |
# Controls when the workflow will run | |
on: | |
schedule: | |
# times in UTC | |
- cron: '37 10 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
update_summaries: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get dates | |
id: date | |
run: | | |
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
echo "yesterday=$(date -d yesterday '+%Y-%m-%d')" >> $GITHUB_OUTPUT | |
echo "this_month=$(date +'%Y-%m')" >> $GITHUB_OUTPUT | |
echo "this_year=$(date +'%Y')" >> $GITHUB_OUTPUT | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: setup env | |
uses: ./.github/actions/setup_my_env | |
- name: summarize this year | |
uses: ./.github/actions/generate_summaries | |
with: | |
ymd_option: '--year' | |
ymd_value: ${{ steps.date.outputs.this_year }} | |
- name: add and commit | |
uses: ./.github/actions/commit_results | |
with: | |
commit_msg: ${{ github.workflow }} for year ${{ steps.date.outputs.this_year }} | |
- name: push results | |
uses: ./.github/actions/pull_rebase_push_retry |