-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from relaton/feature/move-to-external-workflow
relaton/support#7 move to external workflow
- Loading branch information
Showing
3 changed files
with
24 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,23 @@ | ||
# Auto-generated by Cimas: Do not edit it manually! | ||
# See https://github.com/metanorma/cimas | ||
name: Crawler | ||
|
||
on: | ||
push: | ||
branches: [ master, main ] | ||
tags: [ v* ] | ||
pull_request: | ||
schedule: | ||
- cron: '0 12 * * *' | ||
- cron: '0 14 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
args: | ||
description: Extra args to pass to crawler.rb script | ||
required: false | ||
default: '' | ||
|
||
jobs: | ||
crawl: | ||
name: ITU-R documents fetching | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0 | ||
- name: Update gems | ||
run: | | ||
gem install bundler | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Fetch documents | ||
run: bundle exec ruby crawler.rb | ||
- name: Push data | ||
run: | | ||
echo `date` > flag.txt | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add data/* flag.txt | ||
git diff --quiet && git diff --staged --quiet || (git commit -m 'update documents' && git push) | ||
uses: relaton/support/.github/workflows/crawler.yml@master | ||
with: | ||
args: ${{ github.event.inputs.args }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Auto-generated by Cimas: Do not edit it manually! | ||
# See https://github.com/metanorma/cimas | ||
name: keep-alive | ||
on: | ||
schedule: | ||
- cron: "0 0 1 * *" # on the first day-of-month | ||
|
||
jobs: | ||
keep-alive: | ||
uses: metanorma/ci/.github/workflows/keep-alive.yml@main |