Scanner Data Update #1861
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: Scanner Data Update | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 */4 * * *" | |
jobs: | |
update-data: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install | |
- name: Fetch Market Scanner Data | |
run: | | |
node index.js || echo "Failed to fetch data" | |
- name: Run Bot Task | |
run: | | |
chmod +x ./index.sh | |
./index.sh | |
- name: Commit and push if there are changes | |
uses: ad-m/github-push-action@master | |
with: | |
force: true | |
directory: "." | |
branch: main | |
github_token: ${{ secrets.GITHUB_TOKEN }} |