Sync Forks #107
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 Forks | |
on: | |
schedule: | |
- cron: '10 */8 * * *' | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
sync-forks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install @octokit/core @octokit/plugin-rest-endpoint-methods node-fetch | |
- name: Add SSH key | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Set Git user configuration | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Prabhakar Chaganti" | |
- name: Sync forks | |
env: | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
run: node --experimental-modules sync-forks.js |