Skip to content

Commit

Permalink
test even more concise syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioseel committed Oct 16, 2024
1 parent a8fe832 commit ccb9229
Showing 1 changed file with 23 additions and 35 deletions.
58 changes: 23 additions & 35 deletions .github/workflows/container_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,26 @@ jobs:
singularity-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: test yes
if: inputs.deploy == 'true'
run: echo "yes"

- name: test no
if: inputs.deploy != 'true'
run: echo "no"
# - 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 [[ "${{ inputs.deploy }}" != "" ]]; then
echo "deploy=${{ 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 TRUE
if: steps.setup.outputs.deploy == 'true'
run:
echo "yes"

- name: Test input FALSE
if: steps.setup.outputs.deploy == 'false'
run:
echo "no"
# - name: Evaluate whether build should be deployed
# id: setup
# run: |
# if [[ "${{ inputs.deploy }}" != "" ]]; then
# echo "deploy=${{ inputs.deploy }}" >> $GITHUB_OUTPUT
# else
# echo "deploy=false" >> $GITHUB_OUTPUT
# fi

# - name: Build Singularity container
# run: apptainer build retinal-rl.sif resources/retinal-rl.def
Expand All @@ -70,9 +59,8 @@ jobs:
# 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
# - name: Deployment / Push to ghcr.io
# if: steps.setup.outputs.deploy == 'true'
# 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
# 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

0 comments on commit ccb9229

Please sign in to comment.