Opdater kursus tilmeldinger #17
This file contains hidden or 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
| on: | |
| workflow_run: | |
| workflows: ["Opdater_kursus_metadata"] | |
| types: | |
| - completed | |
| name: Opdater kursus tilmeldinger | |
| jobs: | |
| render: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| name: opdaterer tilmeldinger | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev | |
| sudo apt-get install -y libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev | |
| sudo apt-get install -y libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev | |
| - name: Install packages | |
| run: | | |
| Rscript -e 'install.packages("curl")' | |
| Rscript -e 'install.packages("here")' | |
| Rscript -e 'install.packages("tidyverse")' | |
| Rscript -e 'install.packages("httr")' | |
| Rscript -e 'install.packages("httr2")' | |
| Rscript -e 'install.packages("readr")' | |
| Rscript -e 'install.packages("openssl")' | |
| Rscript -e 'install.packages("zoo")' | |
| Rscript -e 'install.packages("digest")' | |
| - name: Hent nye tilmeldinger | |
| env: | |
| CLIENT_SECRET: ${{ secrets.CLIENT_SECRET}} | |
| run: Rscript -e 'source("scripts/hent_nye_tilmeldinger.R")' | |
| - name: Commit results | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Actions" | |
| git add -A . | |
| git commit -m 'Opdateret med nye tilmeldinger' || echo "No changes to commit" | |
| git push origin || echo "No changes to commit" |