forked from ci-for-research/self-hosted-runners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub-actions-runner-singularity.def
43 lines (35 loc) · 1.13 KB
/
github-actions-runner-singularity.def
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
Bootstrap: library
From: ubuntu:20.04
Stage: build
%files
./entrypoint.sh /
%environment
export LC_ALL=C
export DEBIAN_FRONTEND=noninteractive
export RUNNER_VERSION=2.267.1
export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
%post
export RUNNER_VERSION=2.267.1
chmod +x /entrypoint.sh
apt-get install -y --no-install-recommends software-properties-common
add-apt-repository universe
add-apt-repository multiverse
apt-get update -y
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
jq \
git \
libcurl4-openssl-dev
echo ${RUNNER_VERSION}
mkdir /opt/actions-runner && cd /opt/actions-runner
curl -L "https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz" > actions_runner.tar.gz && \
tar -zxf actions_runner.tar.gz && \
rm -f actions_runner.tar.gz && \
./bin/installdependencies.sh
NOW=`date`
echo "export NOW=\"${NOW}\"" >> $SINGULARITY_ENVIRONMENT
%runscript
echo "Container was created $NOW"
echo "Arguments received: $*"
exec /bin/bash /entrypoint.sh "$@"