File tree 2 files changed +42
-2
lines changed
2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Github Actions Runner VM image
2
+ on :
3
+ workflow_dispatch :
4
+
5
+ jobs :
6
+ packer :
7
+ runs-on : ubuntu-latest
8
+ permissions : {}
9
+ steps :
10
+ - name : Checkout
11
+ uses : actions/checkout@v4
12
+ with :
13
+ sparse-checkout : |
14
+ .github
15
+ ydb/ci/
16
+
17
+ - name : packer build
18
+ shell : bash
19
+ env :
20
+ YC_SERVICE_ACCOUNT_KEY_FILE : /tmp/yc_sa.json
21
+ CUSTOM_VARS_FILE : /tmp/custom.pkrvars.hcl
22
+ YC_SA_JSON_CREDENTIALS : ${{ secrets.YC_SA_JSON_CREDENTIALS }}
23
+ GH_RUNNER_BUILD_IMAGE_CUSTOM_VARS_HCL : ${{ vars.GH_RUNNER_BUILD_IMAGE_CUSTOM_VARS_HCL }}
24
+ run : |
25
+ set -e
26
+ echo "$YC_SA_JSON_CREDENTIALS" > "$YC_SERVICE_ACCOUNT_KEY_FILE"
27
+ echo "$GH_RUNNER_BUILD_IMAGE_CUSTOM_VARS_HCL" > "$CUSTOM_VARS_FILE"
28
+
29
+ args=()
30
+ if [ -s "$CUSTOM_VARS_FILE" ]; then
31
+ args+=(-var-file="$CUSTOM_VARS_FILE")
32
+ fi
33
+
34
+ set -x
35
+ cd ./ydb/ci/gh-runner-image/
36
+ packer init .
37
+ packer build "${args[@]}" .
38
+
39
+
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ build {
30
30
31
31
provisioner "file" {
32
32
content = << EOF
33
- set -x
33
+ set -xe
34
34
apt-get update
35
35
# wait for unattended-upgrade is finished
36
36
apt-get -o DPkg::Lock::Timeout=600 -y --no-install-recommends dist-upgrade
@@ -39,7 +39,7 @@ apt-get -y install --no-install-recommends \
39
39
liblttng-ust1 lld-14 llvm-14 m4 make ninja-build parallel postgresql-client postgresql-client \
40
40
python-is-python3 python3-pip s3cmd s3cmd zlib1g
41
41
42
- apt-get -y purge lxd-agent-loader snapd modemanager
42
+ apt-get -y purge lxd-agent-loader snapd modemmanager
43
43
apt-get -y autoremove
44
44
45
45
pip3 install conan==1.59 pytest==7.1.3 pytest-timeout pytest-xdist==3.3.1 setproctitle==1.3.2 \
61
61
provisioner "file" {
62
62
content = << EOF
63
63
#!/bin/env/sh
64
+ set -xe
64
65
65
66
mkdir -p /opt/cache/actions-runner/latest
66
67
You can’t perform that action at this time.
0 commit comments