Database Sync Task #12828
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: Database Sync Task | |
on: | |
schedule: | |
- cron: '*/30 * * * *' | |
repository_dispatch: | |
types: [start-build-workflow] | |
workflow_dispatch: | |
jobs: | |
SyncDatabase: | |
name: Sync Database | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Pull Database | |
env: | |
SPECIAL_KEY: ${{secrets.SPECIAL_KEY}} | |
uses: ./ | |
id: pull | |
- name: Push to Repo | |
run: | | |
git config user.name "Database Sync Task" | |
git config user.email "action@github.com" | |
git add -A || true | |
git commit -m "Sync Database" && git push || true |