Skip to content

Commit 1941eb5

Browse files
committed
For new releases, build an apptainer SIF image and host it as a GitHub package
1 parent f17df8b commit 1941eb5

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: build-apptainer.yml
2+
on:
3+
push:
4+
tags:
5+
- '[0-9]+.[0-9]+.[0-9]+' # Push events to regular version tags only
6+
branches:
7+
- master
8+
9+
jobs:
10+
build-test-container:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
container:
17+
image: kaczmarj/apptainer:latest
18+
options: --privileged
19+
20+
name: Build Apptainer
21+
steps:
22+
23+
- name: Check out code for the container builds
24+
uses: actions/checkout@v4
25+
26+
- name: Build SIF image
27+
run: |
28+
apptainer build bidscoin.sif apptainer.def
29+
30+
- name: Login and Deploy Container
31+
run: |
32+
echo ${{ secrets.GITHUB_TOKEN }} | apptainer remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
33+
apptainer push bidscoin.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${tag}

docs/installation.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,15 @@ The current Apptainer image includes:
100100

101101
This image does not include FreeSurfer/synthstrip (needed for ``skullstrip``)
102102

103+
Downloading the container image
104+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105+
106+
You can download Apptainer images `directly from GiHub packages <https://github.com/orgs/Donders-Institute/packages?repo_name=bidscoin>`__
107+
103108
Building the container image
104109
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105110

106-
Download the Apptainer `definition file <https://github.com/Donders-Institute/bidscoin/blob/master/apptainer.def>`__ and execute the following command to build a BIDScoin container image:
111+
If you want to build the BIDScoin container image yourself, you can download the Apptainer `definition file <https://github.com/Donders-Institute/bidscoin/blob/master/apptainer.def>`__ and execute the following command:
107112

108113
.. code-block:: console
109114

0 commit comments

Comments
 (0)