diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index ea1e22cc4c6..d91fee009c1 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -9,11 +9,16 @@ on: - cron: '0 14 * * *' workflow_dispatch: +env: + token: "test" + jobs: crawl: uses: relaton/support/.github/workflows/crawler.yml@master with: override-files: | - https://raw.githubusercontent.com/ietf-tools/bibxml-service/main/Gemfile=Gemfile + https://raw.githubusercontent.com/ietf-tools/bibxml-service/main/Gemfile=Gemfileg args: ${{ github.event.inputs.args }} commit-indexes: false + secrets: inherit + diff --git a/crawler.rb b/crawler.rb index 63a41c6918b..27801aa3fc6 100644 --- a/crawler.rb +++ b/crawler.rb @@ -1,14 +1,18 @@ # frozen_string_literal: true require "fileutils" +require "relaton_ieee" t1 = Time.now puts "Started at: #{t1}" -system("git clone https://github.com/ietf-tools/relaton-data-ieee") +token = ENV["token"] +puts token + +system("git clone https://oauth2:#{token}@github.com/ietf-ribose/ieee-rawbib.git ieee-rawbib") FileUtils.rm_rf("data") -FileUtils.cp_r("relaton-data-ieee/data", ".") -FileUtils.rm_rf("relaton-data-ieee") +RelatonIeee::DataFetcher.fetch +FileUtils.rm_rf("ieee-rawbib") t2 = Time.now puts "Stopped at: #{t2}"