Sponsorship — Win Post #1036
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: Sponsorship — Win Post | |
| # Polls the Pipeline for newly-Won deals and posts once to #operations. There is no | |
| # Notion webhook in this repo, so we poll hourly; a permanent per-deal claim in the Notion | |
| # ⚙️ Job Log makes re-runs idempotent (only un-announced Won deals are posted). The claim | |
| # replaced a channel-history marker that only saw the last 200 messages, so old wins came | |
| # back around whenever their post scrolled out of #operations. | |
| on: | |
| schedule: | |
| - cron: '0 * * * *' # hourly | |
| workflow_dispatch: | |
| inputs: | |
| backfill: | |
| description: 'Seed the Job Log from current Won deals (marks them announced, posts nothing) — run once' | |
| type: boolean | |
| default: false | |
| jobs: | |
| win-post: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: sponsor-win-post | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: PERBot/package-lock.json | |
| - name: Install dependencies | |
| working-directory: PERBot | |
| run: npm ci | |
| - name: Post any new sponsor wins | |
| working-directory: PERBot | |
| run: npm run job:sponsor-win | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
| NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
| SPONSOR_WIN_CHANNEL: ${{ vars.SPONSOR_WIN_CHANNEL || 'operations' }} | |
| WIN_POST_BACKFILL: ${{ inputs.backfill }} |