Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Oct 18, 2023
1 parent e06af23 commit 9d2dd13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/apptainer-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Singularity Build
on:
push:
tags:
- sif-*
- sif-*-v*.*

jobs:
build-and-push-image:
Expand All @@ -18,8 +18,8 @@ jobs:
uses: actions/checkout@v4
- name: Build Container
run: |
cont_name="${GITHUB_REF_NAME#sif-}"
echo "Container name is ${cont_name:-}."
cont_name=$(echo "${GITHUB_REF_NAME:-}" | sed -E 's/^sif//; s/-v[0-9]+[.].*$//')
echo "Container name is $cont_name."
[ -d "${cont_name:-}" ] || exit 1
pushd "${cont_name}" && apptainer build --fakeroot --fix-perms --warn-unused-build-args --build-arg ORAS_REPO="${{ github.repository }}" ../${cont_name}.sif Singularity && popd
tag="${tag:-latest}"
Expand Down

0 comments on commit 9d2dd13

Please sign in to comment.