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
23
34on :
45 release :
89 IMAGE_NAME : ${{ github.repository }}
910
1011jobs :
11- build-and-push-image :
12+ build-and-push-docker :
1213 runs-on : ubuntu-latest
1314 permissions :
1415 contents : read
4344 tags : ${{ steps.meta.outputs.tags }}
4445 labels : ${{ steps.meta.outputs.labels }}
4546 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