Skip to content

Commit

Permalink
feat: Update deployment instructions and runner configuration
Browse files Browse the repository at this point in the history
This commit updates the deployment instructions in the README.md file to provide clearer guidance on how to obtain an access token. It also adds a table listing the available environment variables for customizing the runner deployment.

In addition, this commit modifies the start.sh script to include support for specifying labels and a name for the runner during configuration.

These changes aim to improve user experience and make it easier to deploy and configure the GitHub Actions runner.
  • Loading branch information
winromulus committed Dec 24, 2023
1 parent cb07874 commit 168e712
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,17 @@ The runner can be deployed in Docker using either `docker run` or `docker compos
#### Deployment in `docker`

```
docker run -d -e ORGANIZATION="<org name>" -e ACCESS_TOKEN="<access token>" -e REPO="<optional repo name>" emberstack/github-actions-runner
docker run -d -e ACCESS_TOKEN="<access token>" -e ORGANIZATION="<org name>" -e REPO="<optional repo name>" emberstack/github-actions-runner
```

> See [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to understand how to get an access token.
You can customize the values of the deployment by using the following environment variables:

| Environment Variable | Description | Required |
|-------------------------------|---------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| `ACCESS_TOKEN` | The access token (PAT - Personal Access token) used to register the runner | Required |
| `ORGANIZATION` | The owner or organization | Required |
| `REPO` | The repository on which to register the runner | Optional - Registers to the org. if not specified |
| `LABELS` | Comma separated list of labels to apply to the runner | Optional |
| `NAME` | Runner name | Optional - Defaults to the hostname if not specified |
5 changes: 0 additions & 5 deletions src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ RUN apt-get update \
unzip \
&& rm -rf /var/lib/apt/lists/*


# RUN apt install -y --no-install-recommends \
# curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip


WORKDIR /actions-runner

COPY ./start.sh .
Expand Down
6 changes: 4 additions & 2 deletions src/docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ fi
ORGANIZATION=$ORGANIZATION
ACCESS_TOKEN=$ACCESS_TOKEN
REPO=$REPO
LABELS=$LABELS
NAME=$NAME

echo "Setup - Determining matching runner..."

Expand All @@ -42,9 +44,9 @@ fi

echo "Setup - Configuring runner..."
if [ -z "$REPO" ]; then
./config.sh --url https://github.com/${ORGANIZATION} --token ${REG_TOKEN}
./config.sh --url https://github.com/${ORGANIZATION} --token ${REG_TOKEN} --labels ${LABELS} --name ${NAME}
else
./config.sh --url https://github.com/${ORGANIZATION}/${REPO} --token ${REG_TOKEN}
./config.sh --url https://github.com/${ORGANIZATION}/${REPO} --token ${REG_TOKEN} --labels ${LABELS} --name ${NAME}
fi

cleanup() {
Expand Down

0 comments on commit 168e712

Please sign in to comment.