update-codelists #574
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: Update codelists | |
on: | |
repository_dispatch: | |
types: [update-codelists] | |
jobs: | |
update-codelists: | |
name: Update codelists | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- uses: actions/cache@v2 | |
name: Cache python dependencies | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Update codelists | |
run: | | |
iati download-codelists | |
- name: Create a pull request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
commit-message: Codelist update | |
committer: CodeforIATI bot <[email protected]> | |
author: CodeforIATI bot <[email protected]> | |
branch: codelist-update | |
delete-branch: true | |
title: Codelist update | |
body: Codelist update, sent from [this GitHub Action build](https://github.com/codeforIATI/iati-datastore/actions/runs/${{ github.run_id }}). | |
reviewers: markbrough,andylolz |