-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (50 loc) · 1.65 KB
/
bibliographyUpdater.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 }}