-
Notifications
You must be signed in to change notification settings - Fork 48
65 lines (61 loc) · 1.94 KB
/
apptainer.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: apptainer
on:
push:
branches:
- patch1
env:
VERSION: '1.4.1.9015' # versioned by bump2version
jobs:
docker2apptainer:
name: Docker2apptainer
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
- name: Check free space
run: |
echo "Free space:"
df -h
- name: Code checkout
uses: actions/checkout@v4
with:
ref: v${{ env.VERSION }}
- name: 🏰 QEMU setup
uses: docker/setup-qemu-action@v3
- name: 🏯 Buildx setup
uses: docker/setup-buildx-action@v3
- name: DockerHub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🐳 Docker img build and push to DockerHub
uses: docker/build-push-action@v6
with:
context: . # yes, dot
push: false
platforms: linux/amd64
tags: |
sigven/pcgr:${{ env.VERSION }}
outputs: type=docker,dest=pcgr_${{ env.VERSION }}.tar
- name: Apptainer setup
uses: eWaterCycle/setup-apptainer@v2
- name: Apptainer build
run: |
docker image ls -a
#docker save sigven/pcgr:${VERSION} -o pcgr_${VERSION}.tar
ls -la
df -h
echo "Building Apptainer SIF"
echo "---------------------------------"
apptainer build pcgr_singularity_${VERSION}.sif docker-archive://pcgr_${VERSION}.tar
echo "---------------------------------"
ls -la
df -h
#- name: Upload SIF to GHCR
# run: |
# echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ github.actor }} --password-stdin oras://ghcr.io
# apptainer push pcgr_${VERSION}.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${VERSION}