-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:rse-ops/singularity-mpi
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Singularity Build (docker) | ||
on: | ||
push: | ||
|
||
# Edit the branches here if you want to change deploy behavior | ||
branches: | ||
- main | ||
|
||
# Do the builds on all pull requests (to test them) | ||
pull_request: [] | ||
|
||
jobs: | ||
build-container: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
# Keep going on other deployments if anything bloops | ||
fail-fast: false | ||
matrix: | ||
recipe: [Singularity.mpich, Singularity.openmpi] | ||
singularity_version: | ||
- '3.8.1' | ||
|
||
container: | ||
image: quay.io/singularity/singularity:v${{ matrix.singularity_version }} | ||
options: --privileged | ||
|
||
name: Build ${{ matrix.recipe }} | ||
steps: | ||
|
||
- name: Check out code for the container builds | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build ${{ matrix.recipe }} | ||
env: | ||
recipe: ${{ matrix.recipe }} | ||
run: | | ||
sudo -E singularity build container.sif ${recipe} | ||
tag=$(echo "${recipe/Singularity\./}") | ||
echo "Tag is $tag." | ||
echo "tag=$tag" >> $GITHUB_ENV | ||
- name: Login and Deploy Container | ||
if: (github.event_name != 'pull_request') | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io | ||
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${tag} |