36
36
RETRY_DELAY : 30
37
37
38
38
steps :
39
+ - name : Free up disk space before build
40
+ run : |
41
+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
42
+ docker system prune -af || true
43
+ sudo apt-get clean
44
+ sudo rm -rf /var/lib/apt/lists/*
45
+
39
46
- name : Checkout repository
40
47
uses : actions/checkout@v4
41
48
55
62
VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
56
63
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
57
64
echo "Extracted version: $VERSION"
58
-
59
65
# Extract major and minor version
60
66
MAJOR=$(echo $VERSION | cut -d'.' -f1)
61
67
MINOR=$(echo $VERSION | cut -d'.' -f2)
77
83
# Note: Only building for linux/amd64 as pyopenms doesn't have ARM64 wheels
78
84
platforms : linux/amd64
79
85
86
+ - name : Free up disk space after build
87
+ run : |
88
+ docker system prune -af || true
89
+ sudo apt-get clean
90
+ sudo rm -rf /var/lib/apt/lists/*
91
+
80
92
- name : Set up Singularity
81
93
if : ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
82
94
uses : eWaterCycle/setup-singularity@v7
@@ -86,17 +98,13 @@ jobs:
86
98
- name : Pull Docker image for Singularity conversion
87
99
if : ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
88
100
run : |
89
- # Pull the Docker image from GitHub Container Registry
90
101
docker pull ghcr.io/bigbio/quantms-rescoring:latest
91
- # Save the Docker image to a tar file
92
102
docker save ghcr.io/bigbio/quantms-rescoring:latest -o quantms-rescoring.tar
93
103
94
104
- name : Convert Docker image to Singularity
95
105
if : ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
96
106
run : |
97
- # Convert Docker tar to Singularity SIF
98
107
singularity build quantms-rescoring.sif docker-archive://quantms-rescoring.tar
99
- # Verify the SIF file exists
100
108
ls -la quantms-rescoring.sif
101
109
102
110
- name : Login and Deploy Container
@@ -105,11 +113,7 @@ jobs:
105
113
IS_RELEASE : ${{ github.event_name == 'release' }}
106
114
run : |
107
115
echo ${{ secrets.GHCR_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
108
-
109
- # Push with exact version tag
110
116
singularity push quantms-rescoring.sif oras://ghcr.io/bigbio/quantms-rescoring-sif:${{ steps.version.outputs.VERSION }}
111
-
112
- # If this is a release event, also tag as latest
113
117
if [[ "${{ env.IS_RELEASE }}" == "true" || "${{ github.event_name }}" == "release" ]]; then
114
118
singularity push quantms-rescoring.sif oras://ghcr.io/bigbio/quantms-rescoring-sif:latest
115
119
fi
0 commit comments