Skip to content

Commit

Permalink
GHA: integrate apptainer with main action
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Jun 1, 2024
1 parent 99fad56 commit 115aaef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/apptainer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ jobs:
df -h
- name: Upload SIF to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | apptainer remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
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}
18 changes: 14 additions & 4 deletions .github/workflows/build_conda_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- master
- bundle_update_2023
- apptainer
env:
atoken: ${{ secrets.ANACONDA_UPLOAD_TOKEN }}
recipe_path: conda/recipe
Expand Down Expand Up @@ -126,6 +125,8 @@ jobs:
sha: the_sha
})
- name: 🗑 Free Disk Space
uses: jlumbroso/free-disk-space@main
# work with tag from above
- name: Code checkout
uses: actions/checkout@v4
Expand All @@ -145,16 +146,25 @@ jobs:
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}
ls -la
df -h
echo "Building Apptainer SIF"
echo "---------------------------------"
apptainer build pcgr_singularity_${VERSION}.sif docker-archive://pcgr_${VERSION}.tar
echo "---------------------------------"
ls -lSha
- name: Upload SIF to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ github.actor }} --password-stdin oras://ghcr.io
apptainer push pcgr_singularity_${VERSION}.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${VERSION}.singularity

0 comments on commit 115aaef

Please sign in to comment.