Sync Upstream #20444
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: Sync Upstream | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
schedule: | |
- cron: "*/10 * * * *" # Execute every 10 minutes | |
workflow_dispatch: # allow manually trigger the action | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: # Job-level permissions configuration starts here | |
contents: write # 'write' access to repository contents | |
pull-requests: write # 'write' access to pull requests | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} | |
MYSTEN_SPREEDSHEET_ID: ${{ secrets.MYSTEN_SPREEDSHEET_ID }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 # Use the GitHub checkout action to checkout code | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
# persist-credentials: false # trigger the following actions. ref: https://github.com/orgs/community/discussions/25702#discussioncomment-6313966 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run script | |
run: python ./app/app.py | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} | |
MYSTEN_SPREEDSHEET_ID: ${{ secrets.MYSTEN_SPREEDSHEET_ID }} | |
SUIET_SPREEDSHEET_ID: ${{ secrets.SUIET_SPREEDSHEET_ID }} | |
- name: Generate bloom filter | |
run: python ./app/bloom_filter.py | |
- name: Commit changes | |
run: | | |
git config --global user.email "github@suiet.app" | |
git config --global user.name "GitHub Actions" | |
git add . | |
git commit -m "Auto-update from script" || echo "No changes to commit" | |
git push |