Skip to content

Commit 5102366

Browse files
committed
Another try to fix the Singularity CI workflow
1 parent a717998 commit 5102366

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/container.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
esac
7373
7474
- name: Build Container
75-
if: ${{ env.keepgoing == 'true' }}
75+
if: env.keepgoing == 'true'
7676
env:
7777
recipe: ${{ matrix.changed_file }}
7878
run: |
@@ -93,14 +93,10 @@ jobs:
9393
fi
9494
9595
- name: Login and Deploy Container
96-
if: (github.event_name != 'pull_request')
97-
env:
98-
keepgoing: ${{ env.keepgoing }}
96+
if: (github.event_name != 'pull_request') && ( env.keepgoing == 'true' )
9997
run: |
100-
if [ "${keepgoing}" = "true" ]; then
101-
echo "${{ secrets.GITHUB_TOKEN }}" | singularity remote login -u "${{ secrets.GHCR_USERNAME }}" --password-stdin oras://ghcr.io
102-
declare -a tags=( ${{ needs.gather-metadata.outputs.tags }} )
103-
for tag in "${tags[@]}" ; do
104-
echo singularity push container.sif "oras://ghcr.io/${GITHUB_REPOSITORY}:${tag}"
105-
done
106-
fi
98+
echo "${{ secrets.GITHUB_TOKEN }}" | singularity remote login -u "${{ secrets.GHCR_USERNAME }}" --password-stdin oras://ghcr.io
99+
declare -a tags=( ${{ needs.gather-metadata.outputs.tags }} )
100+
for tag in "${tags[@]}" ; do
101+
echo singularity push container.sif "oras://ghcr.io/${GITHUB_REPOSITORY}:${tag}"
102+
done

0 commit comments

Comments
 (0)