Skip to content

Commit e78e760

Browse files
committed
Run npm run package to update dist/index.js
1 parent 35580d0 commit e78e760

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dist/index.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -62083,13 +62083,15 @@ function buildUserDataScript(githubRegistrationToken, label) {
6208362083
// to be pre-installed in the AMI, so we simply cd into that directory and then start the runner
6208462084
userData = [
6208562085
'#!/bin/bash',
62086+
'exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1',
6208662087
`cd "${config.input.runnerHomeDir}"`,
6208762088
'export RUNNER_ALLOW_RUNASROOT=1',
6208862089
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
6208962090
];
6209062091
} else {
6209162092
userData = [
6209262093
'#!/bin/bash',
62094+
'exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1',
6209362095
'mkdir actions-runner && cd actions-runner',
6209462096
'case $(uname -m) in aarch64) ARCH="arm64" ;; amd64|x86_64) ARCH="x64" ;; esac && export RUNNER_ARCH=${ARCH}',
6209562097
'curl -O -L https://github.com/actions/runner/releases/download/v2.299.1/actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz',
@@ -62098,11 +62100,14 @@ function buildUserDataScript(githubRegistrationToken, label) {
6209862100
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
6209962101
];
6210062102
}
62103+
if (config.input.runAsUser) {
62104+
userData.push(`chown -R ${config.input.runAsUser} .`);
62105+
}
6210162106
if (config.input.runAsService) {
62102-
userData.push('./svc.sh install');
62107+
userData.push(`./svc.sh install ${config.input.runAsUser || ''}`);
6210362108
userData.push('./svc.sh start');
6210462109
} else {
62105-
userData.push('./run.sh');
62110+
userData.push(`${config.input.runAsUser ? `su ${config.input.runAsUser} -c` : ''} ./run.sh`);
6210662111
}
6210762112
return userData;
6210862113
}
@@ -62197,6 +62202,8 @@ class Config {
6219762202
ec2InstanceId: core.getInput('ec2-instance-id'),
6219862203
iamRoleName: core.getInput('iam-role-name'),
6219962204
runnerHomeDir: core.getInput('runner-home-dir'),
62205+
runAsService: core.getInput('run-runner-as-service') === 'true',
62206+
runAsUser: core.getInput('run-runner-as-user')
6220062207
};
6220162208

6220262209
const tags = JSON.parse(core.getInput('aws-resource-tags'));

0 commit comments

Comments
 (0)