7676 with :
7777 singularity-version : 3.8.7
7878
79- - name : Configure Singularity for GitHub Container Registry
80- if : ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
81- run : |
82- # Create Singularity remote endpoint for GitHub Container Registry
83- singularity remote add --no-login GithubContainer oras://ghcr.io
84-
85- # Login to GitHub Container Registry
86- echo "${{ secrets.GHCR_TOKEN }}" | singularity remote login -u ${{ github.actor }} --password-stdin GithubContainer
87-
8879 - name : Pull Docker image for Singularity conversion
8980 if : ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
9081 run : |
@@ -101,17 +92,16 @@ jobs:
10192 # Verify the SIF file exists
10293 ls -la diann-2.1.0.sif
10394
104- - name : Push DiaNN 2.1.0 Singularity container
105- if : ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
106- uses : nick-fields/retry@v2
107- with :
108- timeout_minutes : 15
109- max_attempts : 3
110- retry_wait_seconds : 60
111- command : |
112- # Push to GitHub Container Registry using the configured remote
113- singularity push diann-2.1.0.sif oras://GithubContainer/bigbio/diann-sif:2.1.0
114- singularity push diann-2.1.0.sif oras://GithubContainer/bigbio/diann-sif:latest
95+ - name : Login and Deploy Container
96+ if : (github.event_name != 'pull_request')
97+ env :
98+ keepgoing : ${{ env.keepgoing }}
99+ run : |
100+ if [[ "${keepgoing}" == "true" ]]; then
101+ echo ${{ secrets.GHCR_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
102+ singularity push diann-2.1.0.sif oras://bigbio/diann-sif:2.1.0
103+ singularity push diann-2.1.0.sif oras://bigbio/diann-sif:latest
104+ fi
115105
116106 - name : Notify on success
117107 if : success()
0 commit comments