Skip to content

Commit

Permalink
Merge pull request #4 from relaton/feature/move-to-external-workflow
Browse files Browse the repository at this point in the history
relaton/support#7 move to external workflow
  • Loading branch information
CAMOBAP authored Nov 4, 2023
2 parents bb9ed65 + b90eaf8 commit 25b0229
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/crawler.yml
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 }}
10 changes: 10 additions & 0 deletions .github/workflows/keep-alive.yml
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
1 change: 0 additions & 1 deletion flag.txt

This file was deleted.

0 comments on commit 25b0229

Please sign in to comment.