File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 1
- name : Create and publish a Docker image
1
+
2
+ name : Create and publish container images
2
3
3
4
on :
4
5
release :
8
9
IMAGE_NAME : ${{ github.repository }}
9
10
10
11
jobs :
11
- build-and-push-image :
12
+ build-and-push-docker :
12
13
runs-on : ubuntu-latest
13
14
permissions :
14
15
contents : read
43
44
tags : ${{ steps.meta.outputs.tags }}
44
45
labels : ${{ steps.meta.outputs.labels }}
45
46
build-args : " PYBIOCLIP_VERSION=${{ steps.meta.outputs.version }}"
47
+
48
+ build-and-push-apptainer :
49
+ runs-on : ubuntu-latest
50
+ needs : build-and-push-docker
51
+ permissions :
52
+ contents : read
53
+ packages : write
54
+
55
+ steps :
56
+ - name : Checkout repository
57
+ uses : actions/checkout@v4
58
+
59
+ - name : Log in to the Container registry
60
+ uses : docker/login-action@v3
61
+ with :
62
+ registry : ${{ env.REGISTRY }}
63
+ username : ${{ github.actor }}
64
+ password : ${{ secrets.GITHUB_TOKEN }}
65
+
66
+ - name : Extract version for apptainer build
67
+ id : meta
68
+ uses : docker/metadata-action@v4
69
+ with :
70
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71
+
72
+ - name : Setup apptainer executable
73
+ uses : eWaterCycle/setup-apptainer@v2
74
+ with :
75
+ apptainer-version : 1.3.3
76
+
77
+ - name : Build an apptainer image
78
+ run : apptainer build --build-arg PYBIOCLIP_VERSION=${{ steps.meta.outputs.version }} apptainer.sif apptainer.def
79
+
80
+ - name : Publish apptainer image
81
+ run : apptainer push apptainer.sif oras://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-sif:${{ steps.meta.outputs.version }}
Original file line number Diff line number Diff line change
1
+ Bootstrap: docker
2
+ From: ghcr.io/imageomics/pybioclip:{{ PYBIOCLIP_VERSION }}
3
+
4
+ %arguments
5
+ PYBIOCLIP_VERSION=
6
+
7
+ %runscript
8
+ exec "$@"
You can’t perform that action at this time.
0 commit comments