98 bug switch to dwh connector #95
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: Increment version | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} # Use the branch reference as the concurrency group | |
cancel-in-progress: true # Cancel any in-progress runs in the same group | |
jobs: | |
increment-version: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: ubuntu-latest, r: 'release'} | |
env: | |
RSPM: ${{ matrix.config.rspm }} | |
GITHUB_PAT: ${{ secrets.GH_PAT }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- 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: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libxml2-dev libssl-dev libcurl4-openssl-dev | |
sudo apt-get install -y libharfbuzz-dev libfribidi-dev | |
sudo apt-get install -y pandoc | |
sudo apt-get install -y libudunits2-dev | |
sudo apt-get install -y libgeos-dev libproj-dev libgdal-dev | |
- name: Install R package dependencies | |
run: | | |
install.packages('usethis') | |
shell: Rscript {0} | |
- name: Check & increment version | |
run: | | |
source("./preprocessing/increment_version.R") | |
shell: Rscript {0} | |
- name: Commit and push changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add -A | |
if ! git diff --cached --quiet; then | |
git commit -m 'Increment version [skip ci]' | |
git pull --rebase origin ${{ github.head_ref }} | |
git push origin HEAD:${{ github.head_ref }} | |
else | |
echo "No changes to commit." | |
fi |