Skip to content

Commit

Permalink
fix: screw reusable actions, hopefully it runs now
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioseel committed Oct 10, 2024
1 parent 77f3121 commit e8fd44d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 50 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,31 @@ on:
branches:
- main

jobs:
init:
uses: ./.github/workflows/get_singularity.yml
with:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest
sif_file: retinal-rl_singularity-image-latest.sif
env:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest
sif_file: retinal-rl_singularity-image-latest.sif

lint:
needs: init
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Cache Singularity Image
id: cache-singularity
uses: actions/cache@v3
with:
path: ~/${{ env.sif_file }}
key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }}
- name: Pull Singularity container
if: steps.cache-singularity.outputs.cache-hit != 'true'
run: |
singularity registry login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io
singularity pull ${{ env.sif_file }} ${{ env.singularity_image }}
- name: Checkout code
uses: actions/checkout@v4
with:
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/config_scan.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
name: Scan Configs
on: [pull_request,workflow_dispatch]

jobs:
init:
uses: ./.github/workflows/get_singularity.yml
with:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest
sif_file: retinal-rl_singularity-image-latest.sif
env:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest
sif_file: retinal-rl_singularity-image-latest.sif

jobs:
scan:
needs: init
runs-on: ubuntu-latest
steps:
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Cache Singularity Image
id: cache-singularity
uses: actions/cache@v3
with:
path: ~/${{ env.sif_file }}
key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }}
- name: Pull Singularity container
if: steps.cache-singularity.outputs.cache-hit != 'true'
run: |
singularity registry login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io
singularity pull ${{ env.sif_file }} ${{ env.singularity_image }}
- uses: actions/checkout@v4
- name: Scan classification config
run: |
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/get_singularity.yml

This file was deleted.

0 comments on commit e8fd44d

Please sign in to comment.