Skip to content

fix(?): input processing for action #19

fix(?): input processing for action

fix(?): input processing for action #19

Workflow file for this run

name: Build Singularity Container
on:
schedule:
- cron: '0 2 1 * *'
push:
# branches-ignore:
# - master
# paths:
# - 'resources/retinal-rl.def'
pull_request:
branches:
- master
paths:
- 'resources/retinal-rl.def'
workflow_call:
inputs:
deploy:
type: boolean
required: false
default: true
workflow_dispatch:
inputs:
deploy:
type: boolean
required: false
default: true
jobs:
singularity-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Determine trigger type and set input
id: setup
run: |
if [[ "${{ github.event.inputs.deploy }}" != "" ]]; then
echo "deploy=${{ github.event.inputs.deploy }}" >> $GITHUB_OUTPUT
else
echo "deploy=false" >> $GITHUB_OUTPUT
fi
- name: Test input
run: |
if ${{ steps.setup.outputs.deploy }}"; then
echo "yes"
else
echo "no"
fi
- name: Test input again
if: steps.setup.outputs.deploy
run:
echo "yes"
# - name: Build Singularity container
# run: apptainer build retinal-rl.sif resources/retinal-rl.def
# - name: Scan classification config / ensure minimal functionality
# run: |
# cp -r resources/config_templates/* config/
# singularity exec retinal-rl.sif python main.py -m +experiment=classification command=scan system.device=cpu
# - name: Push to ghcr.io
# run: |
# if ${{ steps.setup.outputs.deploy }}"; then
# singularity registry login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io
# singularity push retinal-rl.sif oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest
# fi