7777 uses : eWaterCycle/setup-singularity@v7
7878 with :
7979 singularity-version : 3.8.7
80+
81+ - name : Configure Singularity for GitHub Container Registry
82+ if : success()
83+ run : |
84+ # Create Singularity remote endpoint for GitHub Container Registry
85+ singularity remote add --no-login GithubContainer oras://ghcr.io
86+
87+ # Login to GitHub Container Registry
88+ echo "${{ secrets.GHCR_TOKEN }}" | singularity remote login -u ${{ github.actor }} --password-stdin GithubContainer
8089
8190 - name : Pull OpenMS SIF container
8291 id : pull_sif
@@ -95,15 +104,17 @@ jobs:
95104 TARGET_SIF="oras://ghcr.io/bigbio/openms-tools-thirdparty-sif:${{ steps.date.outputs.DATE_TAG }}"
96105
97106 echo "Pushing to $TARGET_SIF"
98- singularity push openms-tools-thirdparty.sif $TARGET_SIF || {
99- echo "Failed to push $TARGET_SIF, retrying..."
107+ # Convert the oras:// URL to use the GithubContainer remote
108+ TARGET_REMOTE_SIF=$(echo $TARGET_SIF | sed 's|oras://ghcr.io|oras://GithubContainer|')
109+ singularity push openms-tools-thirdparty.sif $TARGET_REMOTE_SIF || {
110+ echo "Failed to push $TARGET_REMOTE_SIF, retrying..."
100111 sleep 60
101- singularity push openms-tools-thirdparty.sif $TARGET_SIF
112+ singularity push openms-tools-thirdparty.sif $TARGET_REMOTE_SIF
102113 }
103114
104115 # If this is a release push, also tag as latest
105116 if [[ "${{ github.event.inputs.push_release }}" == "true" ]]; then
106- LATEST_SIF="oras://ghcr.io /bigbio/openms-tools-thirdparty-sif:latest"
117+ LATEST_SIF="oras://GithubContainer /bigbio/openms-tools-thirdparty-sif:latest"
107118 singularity push openms-tools-thirdparty.sif $LATEST_SIF || {
108119 echo "Failed to push $LATEST_SIF, retrying..."
109120 sleep 60
0 commit comments