Skip to content

Commit

Permalink
Run npm run package to update dist/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
esteve committed May 18, 2023
1 parent 35580d0 commit e78e760
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62083,13 +62083,15 @@ function buildUserDataScript(githubRegistrationToken, label) {
// to be pre-installed in the AMI, so we simply cd into that directory and then start the runner
userData = [
'#!/bin/bash',
'exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1',
`cd "${config.input.runnerHomeDir}"`,
'export RUNNER_ALLOW_RUNASROOT=1',
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
];
} else {
userData = [
'#!/bin/bash',
'exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1',
'mkdir actions-runner && cd actions-runner',
'case $(uname -m) in aarch64) ARCH="arm64" ;; amd64|x86_64) ARCH="x64" ;; esac && export RUNNER_ARCH=${ARCH}',
'curl -O -L https://github.com/actions/runner/releases/download/v2.299.1/actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz',
Expand All @@ -62098,11 +62100,14 @@ function buildUserDataScript(githubRegistrationToken, label) {
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
];
}
if (config.input.runAsUser) {
userData.push(`chown -R ${config.input.runAsUser} .`);
}
if (config.input.runAsService) {
userData.push('./svc.sh install');
userData.push(`./svc.sh install ${config.input.runAsUser || ''}`);
userData.push('./svc.sh start');
} else {
userData.push('./run.sh');
userData.push(`${config.input.runAsUser ? `su ${config.input.runAsUser} -c` : ''} ./run.sh`);
}
return userData;
}
Expand Down Expand Up @@ -62197,6 +62202,8 @@ class Config {
ec2InstanceId: core.getInput('ec2-instance-id'),
iamRoleName: core.getInput('iam-role-name'),
runnerHomeDir: core.getInput('runner-home-dir'),
runAsService: core.getInput('run-runner-as-service') === 'true',
runAsUser: core.getInput('run-runner-as-user')
};

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

0 comments on commit e78e760

Please sign in to comment.