Merge pull request #8 from Raveshare/master #15
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 Modules | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
branches: | |
- master | |
jobs: | |
check-modules: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install Dependencies | |
run: npm install axios | |
- name: Run Sync Script | |
run: node scripts/sync.js | |
env: | |
SECRET: ${{ secrets.SECRET }} | |
- name: Commit and push changes | |
run: | | |
git config --local user.name "GitHub Action" | |
git config --local user.email "[email protected]" | |
git add scripts/last-synced.json | |
git diff --staged --quiet || git commit -m "ci: update last-synced.json" | |
git push origin master |