Legal values auto-update #927
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: Legal values auto-update | |
on: | |
workflow_dispatch: # so we can run manually | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
legal-values-auto-update: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
## Signing with GPG won't work unless we create a "DTS Bot" GitHub account. | |
#- name: Setup GPG key | |
# id: import_gpg | |
# uses: crazy-max/ghaction-import-gpg@v5 | |
# with: | |
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
# passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
# git_user_signingkey: true | |
# git_commit_gpgsign: true | |
# git_committer_name: GitHub Actions | |
# git_committer_email: [email protected] | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.15.1 | |
cache: 'yarn' # cache seems to not work until yarn is installed, so this might be futile | |
- name: Install Yarn | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn install | |
- name: Run scraper | |
run: yarn run run-scraper | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: auto-update legal values | |
title: Auto-update legal values | |
body: | | |
This is created by a bot, please review and make any appropriate changes. | |
You will have to sign the bot's commit before merging, because it doesn't have permission to do so itself. | |
To do this, run the following commands: | |
``` | |
git fetch | |
git switch legal-values-auto-update | |
git pull | |
git rebase --exec 'git commit -S --amend --no-edit' develop | |
git push --force | |
``` | |
branch: legal-values-auto-update | |
base: develop | |
add-paths: | | |
utils/api/scrapers/output/*.json | |
committer: GitHub Actions <[email protected]> | |
author: GitHub Actions <[email protected]> |