-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.42 KB
/
ilab-base-singularity.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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:v3.11.5
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}