Skip to content

Commit

Permalink
GHA: test apptainer workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Jun 1, 2024
1 parent 1a76d8a commit 27826f8
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/apptainer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: apptainer

on:
push:
branches:
- apptainer

env:
VERSION: '1.4.1.9006' # versioned by bump2version
jobs:
docker2apptainer:
name: Docker2apptainer
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- 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@v5
with:
context: . # yes, dot
push: true
load: true
platforms: linux/amd64
tags: |
sigven/pcgr:${{ env.VERSION }}
- 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
apptainer build pcgr_${VERSION}.sif docker-archive://pcgr_${VERSION}.tar
apptainer push pcgr_${VERSION}.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${VERSION}

0 comments on commit 27826f8

Please sign in to comment.