Skip to content

Update Update Data Files.yml #42

Update Update Data Files.yml

Update Update Data Files.yml #42

name: R script workflow
on: [push]
jobs:
run_r_script:
runs-on: ubuntu-latest
container:
image: minhajuddin2510/rcode_files_update:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: test
- name: Print working directory
run: pwd
- name: Decode Google Sheets token
env:
GSHEET_TOKEN: ${{ secrets.GSHEET_TOKEN }}
run: |
echo "$GSHEET_TOKEN" | base64 -d > boerne-water-supply/gargle-oauth
ls boerne-water-supply/
chmod 644 boerne-water-supply/gargle-oauth
- name: Install system dependencies for R packages
run: |
apt-get install -y libudunits2-dev libproj-dev
- name: Run R script
run: Rscript boerne-water-supply/rcode/use1_demand_data.R
- name: Commit and push if changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add *.csv
git commit -m "Update data file" || echo "No changes to commit"
git push