Skip to content

fix: create workflow evaluating if def file changed instead of input trigger #29

fix: create workflow evaluating if def file changed instead of input trigger

fix: create workflow evaluating if def file changed instead of input trigger #29

Workflow file for this run

name: Scan Configs
on:
pull_request:
branches:
- master
workflow_dispatch:
env:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image
sif_file: retinal-rl_singularity-image.sif
jobs:
check-container-changed:
name: Check if the def file changed
uses: ./.github/workflows/check_def_changed.yml
scan:
needs: check-container-changed
if: needs.check-container-changed.outputs.file_changed == 'false'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Cache Singularity Image
id: cache-singularity
uses: actions/cache@v4
with:
path: ${{ env.sif_file }}
key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }}
restore-keys: |
${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }}
- name: Prepare experiment files
run: bash tests/ci/copy_configs.sh ${{ env.sif_file }}
- name: Scan configs
run: bash tests/ci/scan_configs.sh ${{ env.sif_file }}