Glific Iteration Update #14
This file contains hidden or 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: Glific Iteration Update | |
| on: | |
| schedule: | |
| # Every Monday at 9:00 AM IST (03:30 UTC) | |
| - cron: "30 3 * * 1" | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: "Dry run (print payload, don't post to Discord)" | |
| required: false | |
| default: "false" | |
| type: choice | |
| options: | |
| - "false" | |
| - "true" | |
| jobs: | |
| post-update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check iteration week (second Monday of iteration) | |
| id: parity | |
| run: | | |
| # Manual triggers always run; scheduled runs check iteration position. | |
| # Epoch is a known first-Monday-of-iteration; counting weeks from it | |
| # avoids ISO week-number resets at year boundaries (e.g. 2026 has 53 | |
| # ISO weeks, which would break naive parity checks). | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "run=true" >> $GITHUB_OUTPUT | |
| else | |
| EPOCH_TS=$(date -d "2026-05-04" +%s) | |
| TODAY_TS=$(date +%s) | |
| WEEKS=$(( (TODAY_TS - EPOCH_TS) / 86400 / 7 )) | |
| ITER_WEEK=$((WEEKS % 2)) | |
| if [ "$ITER_WEEK" -eq 1 ]; then | |
| echo "run=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "First Monday of iteration — skipping." | |
| echo "run=false" >> $GITHUB_OUTPUT | |
| fi | |
| fi | |
| - name: Checkout | |
| if: steps.parity.outputs.run == 'true' | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| if: steps.parity.outputs.run == 'true' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| if: steps.parity.outputs.run == 'true' | |
| run: pip install -r requirements.txt | |
| - name: Run update | |
| if: steps.parity.outputs.run == 'true' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PROJECTS_READ_TOKEN }} | |
| ORG: glific | |
| PROJECT_NUMBER: "8" | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: | | |
| if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then | |
| python glific_iteration_update.py --dry-run | |
| else | |
| python glific_iteration_update.py | |
| fi |