Skip to content

Commit

Permalink
GHA: test docker/build-push-action outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Jun 18, 2024
1 parent 7e30146 commit 8bb7d74
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/apptainer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: apptainer
on:
push:
branches:
- apptainer
- patch1

env:
VERSION: '1.4.1.9006' # versioned by bump2version
VERSION: '1.4.1.9015' # versioned by bump2version
jobs:
docker2apptainer:
name: Docker2apptainer
Expand Down Expand Up @@ -35,31 +35,31 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🐳 Docker img build and push to DockerHub
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: . # yes, dot
push: false
load: true
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
#docker save sigven/pcgr:${VERSION} -o pcgr_${VERSION}.tar
ls -la
df -h
echo "Building Apptainer SIF"
echo "---------------------------------"
apptainer build pcgr_${VERSION}.sif docker-archive://pcgr_${VERSION}.tar
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}
#- 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}

0 comments on commit 8bb7d74

Please sign in to comment.