Skip to content

Commit 2cd35dc

Browse files
committed
testing latest tag
1 parent c162e49 commit 2cd35dc

File tree

2 files changed

+2
-56
lines changed

2 files changed

+2
-56
lines changed

.github/workflows/image-release.yml

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -118,61 +118,6 @@ jobs:
118118
if [[ "${keepgoing}" == "true" ]]; then
119119
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
120120
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${tag}
121-
fi
122-
123-
singularity-latest:
124-
needs: docker
125-
runs-on: ubuntu-latest
126-
container:
127-
image: quay.io/singularity/singularity:v3.10.4
128-
strategy:
129-
fail-fast: false
130-
matrix:
131-
recipe: ["Singularity"]
132-
133-
name: Check ${{ matrix.recipe }}
134-
steps:
135-
136-
- name: Check out code for the container build
137-
uses: actions/checkout@v3
138-
139-
- name: Continue if Singularity Recipe Exists
140-
run: |
141-
if [[ -f "${{ matrix.recipe }}" ]]; then
142-
echo "keepgoing=true" >> $GITHUB_ENV
143-
fi
144-
145-
- name: Create tag for Singularity
146-
env:
147-
recipe: ${{ matrix.recipe }}
148-
run: |
149-
ls
150-
if [ -f "${{ matrix.recipe }}" ]; then
151-
sudo -E singularity build container.sif ${{ matrix.recipe }}
152-
tag=$(echo "${recipe/Singularity\./}")
153-
if [ "$tag" == "Singularity" ]; then
154-
tag=latest
155-
fi
156-
# Build the container and name by tag
157-
echo "Tag is $tag."
158-
echo "tag=$tag" >> $GITHUB_ENV
159-
else
160-
echo "${{ matrix.recipe }} is not found."
161-
echo "Present working directory: $PWD"
162-
ls
163-
fi
164-
165-
- name: Update Singularity file tag
166-
run: |
167-
sed -i "s/latest/$tag/" ./Singularity
168-
169-
- name: Login and Deploy Container
170-
#if: (github.event_name != 'pull_request')
171-
env:
172-
keepgoing: ${{ env.keepgoing }}
173-
run: |
174-
if [[ "${keepgoing}" == "true" ]]; then
175-
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
176-
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${tag}
121+
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:latest
177122
fi
178123

.github/workflows/image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,5 @@ jobs:
125125
if [[ "${keepgoing}" == "true" ]]; then
126126
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
127127
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${tag}
128+
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:latest
128129
fi

0 commit comments

Comments
 (0)