Skip to content

Commit cf75975

Browse files
committed
Diann 2.1.0 available
1 parent ae8cbaf commit cf75975

File tree

2 files changed

+35
-33
lines changed

2 files changed

+35
-33
lines changed

.github/workflows/docker-image.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: Build and Push DiaNN Docker Images
33
on:
44
push:
55
branches: [ "main" ]
6-
paths:
7-
- 'diann-*/Dockerfile'
8-
- '.github/workflows/**'
96
pull_request:
107
branches: [ "main" ]
118
paths:
129
- 'diann-*/Dockerfile'
1310
- '.github/workflows/**'
11+
release:
12+
types: [published]
1413
workflow_dispatch:
1514
inputs:
1615
push_images:
@@ -95,11 +94,18 @@ jobs:
9594
- name: Login and Deploy Container
9695
if: (github.event_name != 'pull_request')
9796
env:
98-
keepgoing: ${{ env.keepgoing }}
97+
IS_RELEASE: ${{ github.event_name == 'release' }}
9998
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
99+
echo ${{ secrets.GHCR_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
100+
101+
# Push with version tag
102+
singularity push diann-2.1.0.sif oras://bigbio/diann-sif:2.1.0
103+
104+
# Push with date tag
105+
singularity push diann-2.1.0.sif oras://bigbio/diann-sif:2.1.0-${{ steps.date.outputs.DATE_TAG }}
106+
107+
# If this is a release event, also tag as latest
108+
if [[ "${{ env.IS_RELEASE }}" == "true" || "${{ github.event_name }}" == "release" ]]; then
103109
singularity push diann-2.1.0.sif oras://bigbio/diann-sif:latest
104110
fi
105111

.github/workflows/openms-release.yml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Sync OpenMS Containers
22

33
on:
4+
push:
5+
branches: [ "main" ]
6+
release:
7+
types: [published]
48
workflow_dispatch:
59
inputs:
610
push_release:
@@ -60,8 +64,8 @@ jobs:
6064
docker push $TARGET_CONTAINER
6165
}
6266
63-
# If this is a release push, also tag as latest
64-
if [[ "${{ github.event.inputs.push_release }}" == "true" ]]; then
67+
# If this is a release push or a GitHub release event, also tag as latest
68+
if [[ "${{ github.event.inputs.push_release }}" == "true" || "${{ github.event_name }}" == "release" ]]; then
6569
LATEST_IMAGE="ghcr.io/bigbio/openms-tools-thirdparty:latest"
6670
docker tag $SOURCE_CONTAINER $LATEST_IMAGE
6771
docker push $LATEST_IMAGE || {
@@ -78,15 +82,6 @@ jobs:
7882
with:
7983
singularity-version: 3.8.7
8084

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
89-
9085
- name: Pull OpenMS SIF container
9186
id: pull_sif
9287
if: success()
@@ -97,28 +92,29 @@ jobs:
9792
retry_wait_seconds: 60
9893
command: singularity pull --force openms-tools-thirdparty.sif oras://ghcr.io/openms/openms-tools-thirdparty-sif:latest
9994

100-
- name: Push OpenMS SIF container
95+
- name: Login and Push OpenMS SIF container
10196
if: steps.pull_sif.outcome == 'success'
97+
env:
98+
keepgoing: true
10299
run: |
103-
# Set SIF paths
104-
TARGET_SIF="oras://ghcr.io/bigbio/openms-tools-thirdparty-sif:${{ steps.date.outputs.DATE_TAG }}"
100+
# Login to GitHub Container Registry
101+
echo ${{ secrets.GHCR_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
105102
106-
echo "Pushing to $TARGET_SIF"
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..."
103+
# Set SIF paths and push with date tag
104+
echo "Pushing OpenMS SIF with date tag"
105+
singularity push openms-tools-thirdparty.sif oras://bigbio/openms-tools-thirdparty-sif:${{ steps.date.outputs.DATE_TAG }} || {
106+
echo "Failed to push with date tag, retrying..."
111107
sleep 60
112-
singularity push openms-tools-thirdparty.sif $TARGET_REMOTE_SIF
108+
singularity push openms-tools-thirdparty.sif oras://bigbio/openms-tools-thirdparty-sif:${{ steps.date.outputs.DATE_TAG }}
113109
}
114110
115-
# If this is a release push, also tag as latest
116-
if [[ "${{ github.event.inputs.push_release }}" == "true" ]]; then
117-
LATEST_SIF="oras://GithubContainer/bigbio/openms-tools-thirdparty-sif:latest"
118-
singularity push openms-tools-thirdparty.sif $LATEST_SIF || {
119-
echo "Failed to push $LATEST_SIF, retrying..."
111+
# If this is a release push or a GitHub release event, also tag as latest
112+
if [[ "${{ github.event.inputs.push_release }}" == "true" || "${{ github.event_name }}" == "release" ]]; then
113+
echo "Pushing OpenMS SIF as latest"
114+
singularity push openms-tools-thirdparty.sif oras://bigbio/openms-tools-thirdparty-sif:latest || {
115+
echo "Failed to push as latest, retrying..."
120116
sleep 60
121-
singularity push openms-tools-thirdparty.sif $LATEST_SIF
117+
singularity push openms-tools-thirdparty.sif oras://bigbio/openms-tools-thirdparty-sif:latest
122118
}
123119
echo "Pushed release version as $LATEST_SIF"
124120
fi

0 commit comments

Comments
 (0)