Skip to content

Testing container build #5

Testing container build

Testing container build #5

Workflow file for this run

name: Singularity Build (docker)
on:
push:
# Edit the branches here if you want to change deploy behavior
branches:
- github-registry-changes
# Do the builds on all pull requests (to test them)
pull_request: []
jobs:
changes:
name: "Changed Singularity Recipes"
runs-on: ubuntu-latest
outputs:
changed_file: ${{ steps.files.outputs.added_modified }}
steps:
- id: files
uses: jitterbit/get-changed-files@b17fbb00bdc0c0f63fcf166580804b4d2cdc2a42
with:
format: 'json'
build-containers:
needs:
- changes
runs-on: ubuntu-latest
container:
image: quay.io://singularity/singularity
options: --privileged
name: Check ilab-base
steps:
- name: Check out code for the container builds
uses: actions/checkout@v2
- name: Build Container
run: |
ls
sudo -E singularity build container.sif singularity/ilab-base/ilab-base.def
echo "Tag is $tag."
echo "tag=$tag" >> $GITHUB_ENV
- name: Login and Deploy Container
if: (github.event_name != 'pull_request')
env:
keepgoing: ${{ env.keepgoing }}
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}