-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.09 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy Singularity Container
on:
push:
branches:
- master
paths:
- 'resources/retinal-rl.def'
env:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image
sif_file: retinal-rl_singularity-image.sif
jobs:
build:
name: Build container
uses: ./.github/workflows/container_build.yml
deploy:
name: Deploy container
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Retrieve cached sif file
id: cache-singularity
uses: actions/cache/restore@v4
with:
path: ${{ env.sif_file }}
key: ${{ runner.os }}-singularity-${{ hashFiles('resources/retinal-rl.def') }}
- name: Deployment / Push to ghcr.io
run: |
apptainer registry login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io
apptainer push ${{ env.sif_file }} ${{ env.singularity_image }}