daily-fetch #33
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
name: daily-fetch | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs at UTC 0:00 am every day | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
fetch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: Clean up | |
run: | | |
ls -A | |
rm -r $(ls -A | grep -vE ".github|.git|README.adoc") | |
echo 'cleaned up the old data' | |
ls -A | |
- name: Fetch BIPM data | |
run: | | |
gem install bipm-data-importer | |
gem install webmock | |
bipm-fetch --fork | |
bipm-fetch-cgpm | |
- name: Move generated outcomes to outcomes | |
run: | | |
mv ./data/* ./ | |
ls -A | |
- uses: peter-evans/create-pull-request@v7 | |
with: | |
title: Daily Fetch ${{ github.event.repository.updated_at }} | |
committer: Daily Update <[email protected]> | |
reviewers: | | |
andrew2net | |
opoudjis | |
ronaldtse | |
add-paths: . | |
labels: automerge | |
delete-branch: true | |
commit-message: Daily Update | |
branch: update/bipm-fetch-daily |