Merge pull request #77 from monarch-initiative/oneils-monarchr-registry #12
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: Generate Monarch Resources File | |
on: | |
push: | |
branches: [main] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
generate-resources-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | |
- name: Set up Python 3 | |
uses: actions/setup-python@main | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Dependencies | |
run: poetry install | |
- name: Generate Resources File | |
run: make gen-monarch-resources -B | |
- name: Commit changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add src/docs/resources/monarch-app-resources.json | |
git commit -m "Update resources.json" | |
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |