Skip to content

Merge pull request #78 from riparias/automatic-update-2023-10-08T03-5… #755

Merge pull request #78 from riparias/automatic-update-2023-10-08T03-5…

Merge pull request #78 from riparias/automatic-update-2023-10-08T03-5… #755

Workflow file for this run

on:
schedule:
- cron: "0 3 */7 * *"
push:
branches:
- main
paths:
- data/raw/**
name: fetch-data
jobs:
fetch-data:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_TOKEN: ${{ secrets.WORKFLOWS }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOWS }}
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install linux libraries
run: |
sudo apt install libsodium-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libgdal-dev libproj-dev
sudo apt install libudunits2-dev
- name: Install R packages
run: |
source("src/install_packages.R")
shell: Rscript {0}
- name: Fetch data
run: |
source("src/run_fetch_data.R")
shell: Rscript {0}
- name: Commit and push changes
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.WORKFLOWS }}
commit_prefix: "[AUTO]"
commit_message: "Fetch data"
target_branch: automatic-update
add_timestamp: true
- name: Get branch name
run: |
git branch --show-current
- name: Create pull request
uses: devops-infra/[email protected]
with:
github_token: ${{ secrets.WORKFLOWS }}
target_branch: main
title: "[AUTO] Update data"
template: .github/PULL_REQUEST_TEMPLATE.md
reviewer: damianooldoni
label: automated workflow
get_diff: false