Test github action. #5
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
name: Check S3 Backup and Notify Slack | |
on: | |
workflow_dispatch: # Allows manual trigger from GitHub Actions UI | |
schedule: | |
- cron: '0 13 * * *' # 5:00 AM PST (UTC-8) | |
push: | |
branches: | |
- use-zip-in-backup | |
jobs: | |
check-backup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install boto3 (AWS SDK for Python) | |
run: | | |
python -m pip install --upgrade pip | |
pip install boto3 | |
- name: Check if backup exists in S3 | |
run: python .github/workflows/check_backup.py | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
BACKUP_BUCKET_NAME: "${{ secrets.BACKUP_BUCKET_NAME }}" | |
S3_FOLDER: "db_backup/" | |
SLACK_CHANNEL: "#observability-test" | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |