Skip to content

Update

Update #83

Workflow file for this run

name: Update
on:
schedule:
- cron: '0 5 * * 1'
push:
branches: [main]
jobs:
run_script_and_update:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
persist-credentials: true
fetch-depth: 0
clean: true
- name: Run checkupdate
id: bashscript
run: |
bash ./checkupdate.sh
- name: setup miniconda
if: env.should_run_next_step == 'true'
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
auto-activate-base: false
activate-environment: test
auto-update-conda: true
python-version: "3.11"
environment-file: etc/example-environment.yml
- name: Cache Conda env
if: env.should_run_next_step == 'true'
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{ hashFiles('etc/example-environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
CACHE_NUMBER: 0
id: cache
- name: Update environment
if: steps.cache.outputs.cache-hit != 'true' && env.should_run_next_step == 'true'
run:
mamba env update -n test -f etc/example-environment.yml
- name: Install python dependencies
if: env.should_run_next_step == 'true'
run: |
conda info
echo "========================"
conda list
conda env list
echo "========================"
playwright install chrome chromium
- name: Setup R
if: env.should_run_next_step == 'true'
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.3'
use-public-rspm: true
- name: Cache R dependencies
if: env.should_run_next_step == 'true'
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-R-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: |
${{ runner.os }}-R-
- name: Setup R dependencies
if: env.should_run_next_step == 'true'
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
cache-version: 1
- name: Run bash scripts
if: env.should_run_next_step == 'true'
run: |
bash ./main.sh