Take a snapshot of budget data #913
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: Take a snapshot of budget data | |
on: | |
# Run every day at 12am | |
schedule: | |
- cron: "0 0 * * *" | |
# workflow_dispatch: | |
jobs: | |
generate-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
- name: set env | |
run: | | |
echo "PA_TOKEN=${{ secrets.PA_TOKEN }}" >> $GITHUB_ENV | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Run budget data script | |
run: | | |
source("iati_marker.R") | |
shell: Rscript {0} | |
- name: Commit new file | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add --all | |
git commit -am "add data" | |
git push |