Skip to content

Build images

Build images #28

name: Build Apptainer image with CQ using micromamba
on:
pull_request:
push:
branches: [master, main]
jobs:
build-test-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
container:
image: ghcr.io/apptainer/apptainer:1.4.1
options: --privileged
name: Build Container
steps:
- name: Check out code for the container builds
uses: actions/checkout@v4
- name: Build Container
run: |
apptainer build cq.sif images/cq.def
- name: Test Container
run: |
apptainer run cq.sif pytest tests/
- name: Store sif
uses: actions/upload-artifact@v4
with:
path: cq.sif
- name: Deploy to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
apptainer push cq.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${{ github.ref_name }}
build-docker-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
name: Build Docker
steps:
- name: Check out code for the container builds
uses: actions/checkout@v4
- name: Build Container
run: |
docker build -f images/dockerfile .