Skip to content

Commit

Permalink
Merge branch 'main' of github.com:rse-ops/singularity-mpi
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoch committed Sep 21, 2022
2 parents 61bacf8 + 2be5575 commit cbb9653
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-container.yaml
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}

0 comments on commit cbb9653

Please sign in to comment.