Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: version
on: [push, pull_request]
jobs:
singularity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
with:
cvmfs_repositories: 'singularity.opensciencegrid.org'
- uses: ./
with:
platform-release: "jug_xl:nightly"
apptainer_version: "v1.1.2"
run: |
gcc --version
which gcc
eic-info
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The following parameters are supported:
- `setup`: Initialization/Setup script for a view that sets the environment (e.g. `/opt/detector/setup.sh`)
- `sandbox-path`: Path where the setup script for the custom view is location. By specifying this variable the auto-resolving of the view based on `release` and `platform` is disabled.
- `network_types`: Network types to setup inside container. Defaults to `bridge` networking, but can be `none` to disable networking.
- `apptainer_version`: Apptainer version to use. Defaults to `latest`, but can be any version such as `v1.1.3`.

Please be aware that you must use the combination of parameters `release` and `platform` together or use just the variable `platform-release` alone. These two options are given to enable more flexibility for the user to form their workflow with matrix expressions.

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ inputs:
description: 'Network access types inside EIC shell'
required: false
default: 'bridge'
apptainer_version:
description: 'Apptainer version to use (e.g. v1.1.3 or latest)'
required: false
default: 'latest'

runs:
using: "composite"
Expand All @@ -49,3 +53,4 @@ runs:
SETUP: ${{ inputs.setup }}
SANDBOX_PATH: ${{ inputs.sandbox-path }}
NETWORK_TYPES: ${{ inputs.network_types }}
APPTAINER_VERSION: ${{ inputs.apptainer_version }}
12 changes: 11 additions & 1 deletion run-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ ${RUN}
" > ${GITHUB_WORKSPACE}/action_payload.sh
chmod a+x ${GITHUB_WORKSPACE}/action_payload.sh

v=$(curl -sL https://api.github.com/repos/apptainer/apptainer/releases/latest | jq -r ".tag_name")
if [[ ${APPTAINER_VERSION} == "latest" ]] ; then
v=$(curl -sL --retry 5 https://api.github.com/repos/apptainer/apptainer/releases/latest | jq -r ".tag_name")
# the curl above is fragile, so retry until successful
while [[ ${v} == "null" ]] ; do
sleep 5
v=$(curl -sL --retry 5 https://api.github.com/repos/apptainer/apptainer/releases/latest | jq -r ".tag_name")
done
else
v=${APPTAINER_VERSION}
fi

echo "Installing Apptainer ${v}"
deb="apptainer_${v/v/}_amd64.deb"
sudo wget --quiet --timestamping --output-document /var/cache/apt/archives/${deb} https://github.com/apptainer/apptainer/releases/download/${v}/${deb}
Expand Down