Skip to content

.github/workflows/cron-tasks.yml #195

.github/workflows/cron-tasks.yml

.github/workflows/cron-tasks.yml #195

Workflow file for this run

on:
# Once a week or on pushes to master
schedule:
- cron: "0 3 * * 0"
push:
branches:
- main
jobs:
update_index:
name: Update index file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
- name: Install Dependencies
run: npm install
- name: Set up Git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Update index.bson.br
run: npm run make-index
- name: Verify readability index.bson.br
run: npm run show-index
- name: Commit index.bson.br changes
run: |
git commit --no-allow-empty -m "chore: update index.bson.br" index.bson.br || true
- name: Push updates
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}