Build fix: remove R packages not utilized, remove unnecessary files i… #5
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: Extract Packages | |
on: | |
push: | |
branches: | |
- devel | |
paths: | |
- 'DESCRIPTION' | |
permissions: write-all | |
jobs: | |
extract_packages: | |
runs-on: ubuntu-latest | |
env: | |
R_LIBS_USER: ${{ github.workspace }}/R/library | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Cache R packages | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }} | |
restore-keys: | | |
${{ runner.os }}-r- | |
- name: Install R dependencies | |
run: Rscript -e 'if (!require("stringi", quietly = TRUE)) install.packages("stringi")' | |
- name: Run extract_packages script | |
working-directory: ./oma_packages | |
run: Rscript extract_packages.R | |
- name: Commit and push changes | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
cd oma_packages | |
git add oma_packages.csv | |
git commit -m "Update oma_packages.csv" -a || echo "No changes to commit" | |
git push origin || echo "No changes to commit" |