Skip to content

Extract Packages

Extract Packages #7

name: Extract Packages
on:
push:
paths:
- 'DESCRIPTION'
schedule:
- cron: '*/5 * * * *' # Optional: schedule a weekly run
jobs:
extract_packages:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }} # Ensures the token is passed correctly
persist-credentials: true # Allows Git commands to use this token
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install R dependencies
run: Rscript -e 'install.packages("stringi")' # Install any packages your script needs
- name: Run extract_packages script
run: Rscript extract_packages.R
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add oma_packages.csv
git commit -m "Update oma_packages.csv" -a || echo "No changes to commit"
git push