Skip to content

Commit e0f5c78

Browse files
committed
Incorrect semver on singularity version for workflow
1 parent 6d4b179 commit e0f5c78

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

.github/workflows/singularity.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,42 @@ jobs:
88
build-test-containers:
99
runs-on: ubuntu-latest
1010
strategy:
11-
# Keep going on other deployments if anything bloops
1211
fail-fast: false
1312
matrix:
13+
# Must match an existing tag on quay.io/singularity/singularity (full semver, e.g. 4.1.0 not 4.0).
1414
singularity_version:
15-
- '4.0'
15+
- '4.1.0'
1616

1717
container:
1818
image: quay.io/singularity/singularity:v${{ matrix.singularity_version }}
1919
options: --privileged
2020

2121
steps:
22-
2322
- name: Check out code for the container builds
24-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2524
with:
2625
submodules: recursive
2726

28-
- name: Build Container
27+
- name: Verify Singularity definition exists
2928
run: |
30-
if [ -f Singularity ]; then
31-
sudo -E singularity build container.sif Singularity
32-
else
33-
echo "Singularity is not found."
34-
echo "Present working directory: $PWD"
35-
ls
36-
fi
37-
29+
if [ ! -f Singularity ]; then
30+
echo "Singularity definition file not found in $(pwd)"
31+
ls -la
32+
exit 1
33+
fi
34+
35+
- name: Build Container
36+
run: sudo -E singularity build container.sif Singularity
37+
3838
- name: Set Tag Based on Branch Name
3939
run: |
40-
# Get the branch name and set it as the tag
4140
tag=${GITHUB_REF##*/}-singularity
4241
echo "Tag is $tag."
4342
echo "tag=$tag" >> $GITHUB_ENV
4443
4544
- name: Login and Deploy Container
4645
if: (github.event_name != 'pull_request')
4746
run: |
48-
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
49-
container_name=$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]')
50-
singularity push container.sif oras://ghcr.io/${container_name}:${tag}
47+
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
48+
container_name=$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]')
49+
singularity push container.sif oras://ghcr.io/${container_name}:${tag}

0 commit comments

Comments
 (0)