Skip to content

update eu concern list #5

update eu concern list

update eu concern list #5

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 1-12 *'
name: update eu concern list
jobs:
update_eu_concern_list:
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.AUTOMATISATION }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AUTOMATISATION }}
- 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_eu_concern_list.R")
shell: Rscript {0}
- name: Setup AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Assume Role
id: assume_role
run: |
ROLE_ARN="${{ secrets.AWS_ROLE_ARN }}"
TEMP_ROLE=$(aws sts assume-role \
--role-arn $ROLE_ARN \
--role-session-name inbo-deployment)
echo "::set-output name=AWS_ACCESS_KEY_ID::$(echo $TEMP_ROLE | jq -r .Credentials.AccessKeyId)"
echo "::set-output name=AWS_SECRET_ACCESS_KEY::$(echo $TEMP_ROLE | jq -r .Credentials.SecretAccessKey)"
echo "::set-output name=AWS_SESSION_TOKEN::$(echo $TEMP_ROLE | jq -r .Credentials.SessionToken)"
- name: download_griis_checklist
run: |
source("src/update_eu_concern_list.R")
shell: Rscript {0}
- name: Commit and push changes
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.AUTOMATISATION }}
commit_prefix: "[AUTO]"
commit_message: "update eu concern list"
target_branch: automatic-management-prep
- name: Get branch name
run: |
git branch --show-current
- name: Create pull request
uses: devops-infra/action-pull-request@v0.4.2
with:
github_token: ${{ secrets.AUTOMATISATION }}
target_branch: uat
title: "[AUTO] update eu concern list"
template: .github/PR_PR_update_eu_concern_list.md
reviewer: SanderDevisscher
label: automated workflow
get_diff: false