|
7 | 7 | branches: [ "main" ] |
8 | 8 | paths: |
9 | 9 | - 'diann-*/Dockerfile' |
| 10 | + - 'relink-*/Dockerfile' |
10 | 11 | - '.github/workflows/**' |
11 | 12 | release: |
12 | 13 | types: [published] |
@@ -197,9 +198,93 @@ jobs: |
197 | 198 | run: | |
198 | 199 | echo "::error::Failed to build or push DiaNN 1.8.1 images. Check the logs for details." |
199 | 200 |
|
| 201 | + build-relink-1-0-0: |
| 202 | + name: Build and Push Relink 1.0.0 Docker Images |
| 203 | + runs-on: ubuntu-latest |
| 204 | + permissions: |
| 205 | + contents: read |
| 206 | + packages: write |
| 207 | + |
| 208 | + env: |
| 209 | + RETRY_TIMES: 3 |
| 210 | + RETRY_DELAY: 30 |
| 211 | + |
| 212 | + steps: |
| 213 | + - name: Checkout repository |
| 214 | + uses: actions/checkout@v4 |
| 215 | + |
| 216 | + - name: Set up Docker Buildx |
| 217 | + uses: docker/setup-buildx-action@v3 |
| 218 | + |
| 219 | + - name: Log in to GitHub Container Registry |
| 220 | + uses: docker/login-action@v3 |
| 221 | + with: |
| 222 | + registry: ghcr.io |
| 223 | + username: ${{ github.actor }} |
| 224 | + password: ${{ secrets.GHCR_TOKEN }} |
| 225 | + |
| 226 | + - name: Build and Push Relink 1.0.0 image |
| 227 | + uses: docker/build-push-action@v5 |
| 228 | + with: |
| 229 | + context: ./relink-1.0.0 |
| 230 | + push: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }} |
| 231 | + tags: | |
| 232 | + ghcr.io/bigbio/relink:1.0.0 |
| 233 | + ghcr.io/bigbio/relink:latest |
| 234 | + cache-from: type=gha |
| 235 | + cache-to: type=gha,mode=max |
| 236 | + provenance: false |
| 237 | + |
| 238 | + - name: Set up Singularity |
| 239 | + if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }} |
| 240 | + uses: eWaterCycle/setup-singularity@v7 |
| 241 | + with: |
| 242 | + singularity-version: 3.8.7 |
| 243 | + |
| 244 | + - name: Pull Docker image for Singularity conversion |
| 245 | + if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }} |
| 246 | + run: | |
| 247 | + # Pull the Docker image from GitHub Container Registry |
| 248 | + docker pull ghcr.io/bigbio/relink:1.0.0 |
| 249 | + # Save the Docker image to a tar file |
| 250 | + docker save ghcr.io/bigbio/relink:1.0.0 -o relink-1.0.0.tar |
| 251 | +
|
| 252 | + - name: Convert Docker image to Singularity |
| 253 | + if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }} |
| 254 | + run: | |
| 255 | + # Convert Docker tar to Singularity SIF |
| 256 | + singularity build relink-1.0.0.sif docker-archive://relink-1.0.0.tar |
| 257 | + # Verify the SIF file exists |
| 258 | + ls -la relink-1.0.0.sif |
| 259 | +
|
| 260 | + - name: Login and Deploy Container |
| 261 | + if: (github.event_name != 'pull_request') |
| 262 | + env: |
| 263 | + IS_RELEASE: ${{ github.event_name == 'release' }} |
| 264 | + run: | |
| 265 | + echo ${{ secrets.GHCR_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io |
| 266 | + |
| 267 | + # Push with version tag |
| 268 | + singularity push relink-1.0.0.sif oras://ghcr.io/bigbio/relink-sif:1.0.0 |
| 269 | + |
| 270 | + # If this is a release event, also tag as latest |
| 271 | + if [[ "${{ env.IS_RELEASE }}" == "true" || "${{ github.event_name }}" == "release" ]]; then |
| 272 | + singularity push relink-1.0.0.sif oras://ghcr.io/bigbio/relink-sif:latest |
| 273 | + fi |
| 274 | +
|
| 275 | + - name: Notify on success |
| 276 | + if: success() |
| 277 | + run: | |
| 278 | + echo "::notice::Successfully built and pushed Relink 1.0.0 Docker and Singularity images to ghcr.io/bigbio" |
| 279 | +
|
| 280 | + - name: Notify on failure |
| 281 | + if: failure() |
| 282 | + run: | |
| 283 | + echo "::error::Failed to build or push Relink 1.0.0 images. Check the logs for details." |
| 284 | +
|
200 | 285 | sync-openms: |
201 | 286 | name: Sync OpenMS Containers |
202 | | - needs: [build-diann-2-1-0, build-diann-1-8-1] |
| 287 | + needs: [build-diann-2-1-0, build-diann-1-8-1, build-relink-1-0-0] |
203 | 288 | runs-on: ubuntu-latest |
204 | 289 | permissions: |
205 | 290 | contents: read |
|
0 commit comments