refactor: Update Slack and Twitter workflows to use environment varia… #8
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: Run Slack Pipeline | |
"on": | |
schedule: | |
- cron: "0 0 * * *" # Run daily at midnight | |
workflow_dispatch: # Allow manual triggers | |
push: | |
branches: | |
- main | |
paths: | |
- "pipeline/**" | |
- ".github/workflows/run_slack_workflow.yml" | |
env: | |
# DLT specific environment variables | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
motherduck_token: ${{ secrets.MOTHERDUCK_TOKEN }} | |
# Remove the DLT__ prefixed version since we're using direct env vars | |
PYTHONUNBUFFERED: "1" | |
jobs: | |
maybe_skip: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
concurrent_skipping: always | |
skip_after_successful_duplicate: false | |
run_pipeline: | |
needs: maybe_skip | |
if: needs.maybe_skip.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: pipeline | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
python-version: "3.10" | |
enable-cache: true | |
cache-dependency-glob: | | |
pipeline/pyproject.toml | |
pipeline/uv.lock | |
- name: Run Slack pipeline | |
run: uv run python slack_pipeline.py |