try on push to feature branch #2
Workflow file for this run
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
# .github/workflows/run_python_script.yaml | ||
name: Drop Deprecated Spells | ||
on: | ||
push: | ||
branches: | ||
- drop-inactive-spells # Trigger the workflow on pushes to the feature branch | ||
pull_request: | ||
branches: | ||
- drop-inactive-spells # Trigger the workflow on pull requests targeting the feature branch | ||
schedule: | ||
- cron: '0 14 * * 1' # At 9 AM EST every Monday (14:00 UTC) | ||
workflow_dispatch: | ||
on: | ||
schedule: | ||
- cron: '0 14 * * 1' # At 9 AM EST every Monday (14:00 UTC) | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
run-script: | ||
runs-on: [ self-hosted, linux, spellbook-trino-ci ] | ||
timeout-minutes: 10 # Timeout set to 10 minutes | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main # Specify the main branch | ||
- name: Setup Python environment | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.9' # or whichever version your script requires | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install psycopg2-binary # Add other dependencies here | ||
- name: Set environment variables | ||
run: | | ||
echo "SH_METASTORE_PROD_PASS=${{ secrets.SH_METASTORE_PROD_PASS }}" >> $GITHUB_ENV | ||
# Set any other necessary environment variables here | ||
- name: Run Python script | ||
run: python drop_deprecated_spells.py |