Skip to content

Publish: snapshot/v1 #13348

Publish: snapshot/v1

Publish: snapshot/v1 #13348

name: 'Publish: snapshot/v1'
on:
schedule:
- cron: 0 */2 * * *
push:
branches: [ master ]
jobs:
publish-snapshot:
runs-on: ubuntu-18.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
ref: master
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- uses: actions/setup-node@master
with:
node-version: 14.x
- name: Install NPM dependencies
run: |
cd crawler
npm install
- name: Configure git
run: |
git config user.email "[email protected]"
git config user.name "Brigade Bot"
git fetch origin refs/heads/snapshot/v1:refs/heads/snapshot/v1 refs/heads/cfapi/orgs/v1:refs/heads/cfapi/orgs/v1
- name: Crawl projects
env:
GITHUB_ACTOR: brigade-bot
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: |
node crawler/run.js \
--all \
--commit-to=snapshot/v1 \
--commit-orgs-to=cfapi/orgs/v1
- name: Push results
if: ${{ always() }}
run: |
git push origin refs/heads/snapshot/v1 refs/heads/cfapi/orgs/v1