bibliographyUpdater #282
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: bibliographyUpdater | |
on: | |
schedule: | |
- cron: '06 08 * * *' | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'doc/Galacticus.bib' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
Update-Bibliography: | |
runs-on: ubuntu-latest | |
env: | |
appid: ${{ secrets.DEPLOY_APP_ID }} | |
adstoken: ${{ secrets.NASA_ADS_API_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: tibdex/github-app-token@v2 | |
if: ${{ env.appid != '' }} | |
id: generate-token | |
with: | |
app_id: ${{ secrets.DEPLOY_APP_ID }} | |
private_key: ${{ secrets.DEPLOY_APP_PRIVATE_KEY }} | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
- name: Install tools | |
run: | | |
sudo apt -y update | |
sudo apt install -y libwww-curl-perl libjson-pp-perl perl-doc libtext-bibtex-perl | |
- name: Update the bibliography | |
if: ${{ env.adstoken != '' }} | |
run: | | |
./scripts/aux/bibliographyUpdate.pl ${{ secrets.NASA_ADS_API_TOKEN }} | |
- name: Create Pull Request | |
if: ${{ ( env.appid != '' ) && ( env.adstoken != '' ) }} | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: "fix: Update bibliography records" | |
commit-message: "fix: Update bibliography records" | |
body: | | |
Update | |
This PR is auto generated by [bibliographyUpdater](https://github.com/${{ github.repository }}/actions?query=workflow%3A${{ github.workflow }}). | |
branch: update/bibliography | |
assignees: abensonca | |
token: ${{ steps.generate-token.outputs.token }} |