-
Notifications
You must be signed in to change notification settings - Fork 15
48 lines (43 loc) · 1.32 KB
/
apptainer.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
39
40
41
42
43
44
45
46
47
48
# This workflow builds an apptainer with tike installed
name: Publish Apptainer
on:
workflow_dispatch:
release:
types: [published]
push:
branches: [main]
permissions:
contents: read
packages: write
jobs:
publish-apptainer-to-ghcr:
runs-on: ubuntu-latest
strategy:
matrix:
cuda-version:
- "11.8"
- "12.0"
target-arch:
- "x86_64"
- "aarch64"
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Build container from definition
run: >
apptainer build
--build-arg cuda_version=${{ matrix.cuda-version }}
--build-arg target_arch=${{ matrix.target-arch }}
--build-arg tike_version=${{ github.ref_name }}
apptainer.sif
apptainer/${{ github.event.repository.name }}.def
- name: Upload to container registry
run: |
echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ github.actor }} --password-stdin oras://ghcr.io
apptainer push apptainer.sif oras://ghcr.io/${GITHUB_REPOSITORY,,}:${{ github.ref_name }}-${{ matrix.target-arch }}-cuda${{ matrix.cuda-version }}