Warning, /run-cvmfs-osg-eic-shell/action.yml is written in an unsupported language. File is not indexed.
0001 name: 'execute user code in an EIC environment'
0002 description: 'Spawns appropriate docker image and executes user code in the environment of a specified EIC shell'
0003 branding:
0004 icon: 'play'
0005 color: 'blue'
0006 inputs:
0007 organization:
0008 description: 'EIC shell organization you are targeting (e.g. eic)'
0009 required: false
0010 default: 'eicweb'
0011 platform:
0012 description: 'EIC shell platform you are targeting (e.g. eic_xl)'
0013 required: false
0014 default: ''
0015 release:
0016 description: 'EIC shell release you are targeting (e.g. 3.0-stable)'
0017 required: false
0018 default: ''
0019 platform-release:
0020 description: 'EIC shell release platform string you are targeting (e.g. eic_xl:24.11.2-stable)'
0021 required: false
0022 default: ''
0023 cvmfs-prefix:
0024 description: 'Base CVMFS path prefix containing EIC shell images (default: /cvmfs/singularity.opensciencegrid.org)'
0025 required: false
0026 default: '/cvmfs/singularity.opensciencegrid.org'
0027 run:
0028 description: 'They payload code you want to execute on top of the view'
0029 required: false
0030 default: ''
0031 setup:
0032 description: 'Environment initialization bash script that is sourced (e.g. install/bin/thisepic.sh)'
0033 required: false
0034 default: ''
0035 sandbox-path:
0036 description: 'Custom path where the sandbox is located'
0037 required: false
0038 default: ''
0039 apptainer_version:
0040 description: 'Apptainer version to use (e.g. v1.5.3)'
0041 required: false
0042 default: 'latest'
0043 apptainer_deb_cache:
0044 description: 'Location (directory) of the cached apptainer deb.'
0045 required: false
0046 default: 'apptainer_deb_cache'
0047
0048 runs:
0049 using: "composite"
0050 steps:
0051 - name: Resolve Apptainer version
0052 id: resolve-apptainer-version
0053 shell: bash
0054 run: |
0055 if [[ "${{ inputs.apptainer_version }}" == "latest" ]] ; then
0056 v=$(curl -sL --retry 5 https://api.github.com/repos/apptainer/apptainer/releases/latest | jq -r ".tag_name")
0057 while [[ ${v} == "null" ]] ; do
0058 sleep 5
0059 v=$(curl -sL --retry 5 https://api.github.com/repos/apptainer/apptainer/releases/latest | jq -r ".tag_name")
0060 done
0061 else
0062 v="${{ inputs.apptainer_version }}"
0063 fi
0064 echo "apptainer_version=${v}" >> $GITHUB_OUTPUT
0065 - name: Restore cached apptainer package
0066 id: cache-restore
0067 uses: actions/cache@v6
0068 with:
0069 key: apptainer-deb-cache-${{ steps.resolve-apptainer-version.outputs.apptainer_version }}
0070 path: |
0071 ${{ inputs.apptainer_deb_cache }}
0072 - name: Run inside eic-shell
0073 id: run-eic-shell
0074 run: |
0075 ${{ github.action_path }}/setup-eic-shell.sh
0076 shell: bash
0077 env:
0078 THIS: ${{ github.action_path }}
0079 GITHUB_ACTOR: ${{ github.actor }}
0080 EIC_SHELL_ORGANIZATION: ${{ inputs.organization }}
0081 EIC_SHELL_RELEASE: ${{ inputs.release }}
0082 EIC_SHELL_PLATFORM_RELEASE: ${{ inputs.platform-release }}
0083 EIC_SHELL_PLATFORM: ${{ inputs.platform }}
0084 EIC_SHELL_CVMFS_PREFIX: ${{ inputs.cvmfs-prefix }}
0085 RUN: ${{ inputs.run }}
0086 SETUP: ${{ inputs.setup }}
0087 SANDBOX_PATH: ${{ inputs.sandbox-path }}
0088 APPTAINER_DEB_CACHE: ${{ inputs.apptainer_deb_cache }}
0089 APPTAINER_VERSION: ${{ steps.resolve-apptainer-version.outputs.apptainer_version }}
0090 - name: Store apptainer package to cache
0091 uses: actions/cache/save@v6
0092 if: steps.run-eic-shell.outputs.cache-update == 'true'
0093 with:
0094 key: apptainer-deb-cache-${{ steps.resolve-apptainer-version.outputs.apptainer_version }}
0095 path: |
0096 ${{ inputs.apptainer_deb_cache }}