Skip to content

Commit 1731343

Browse files
author
Ian Walter
committed
Working on actions-runner
1 parent 47c2a11 commit 1731343

File tree

5 files changed

+87
-1
lines changed

5 files changed

+87
-1
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ value derives, entirely or substantially, from the functionality of the
2828
Software. Any license notice or attribution required by the License must also
2929
include this Commons Clause License Condition notice.
3030

31-
Software: generates
31+
Software: kdot
3232

3333
License: Apache 2.0
3434

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:15.4-buster
2+
3+
ENV RUNNER_VERSION=2.263.0
4+
5+
RUN useradd -m actions
6+
RUN apt-get -yqq update && apt-get install -yqq curl jq wget
7+
8+
RUN \
9+
LABEL="$(curl -s -X GET 'https://api.github.com/repos/actions/runner/releases/latest' | jq -r '.tag_name')" \
10+
RUNNER_VERSION="$(echo ${latest_version_label:1})" \
11+
cd /home/actions && mkdir actions-runner && cd actions-runner \
12+
&& wget https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
13+
&& tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
14+
15+
WORKDIR /home/actions/actions-runner
16+
RUN chown -R actions ~actions && /home/actions/actions-runner/bin/installdependencies.sh
17+
18+
USER actions
19+
COPY entrypoint.sh .
20+
ENTRYPOINT ["./entrypoint.sh"]

packages/kdot-actions-runner/LICENSE

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright Ian Walter <[email protected]> (https://ianwalter.dev)
2+
3+
Licensed under the Apache License, Version 2.0 (the "License") modified with
4+
Commons Clause Restriction; you may not use this file except in compliance with
5+
the License. You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software distributed
10+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
12+
specific language governing permissions and limitations under the License.
13+
14+
"Commons Clause" License Condition v1.0
15+
16+
The Software is provided to you by the Licensor under the License, as defined
17+
below, subject to the following condition.
18+
19+
Without limiting other conditions in the License, the grant of rights under the
20+
License will not include, and the License does not grant to you, the right to
21+
Sell the Software.
22+
23+
For purposes of the foregoing, "Sell" means practicing any or all of the rights
24+
granted to you under the License to provide to third parties, for a fee or other
25+
consideration (including without limitation fees for hosting or
26+
consulting/support services related to the Software), a product or service whose
27+
value derives, entirely or substantially, from the functionality of the
28+
Software. Any license notice or attribution required by the License must also
29+
include this Commons Clause License Condition notice.
30+
31+
Software: kdot-actions-runner
32+
33+
License: Apache 2.0
34+
35+
Licensor: Ian Walter
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -eEuo pipefail
3+
4+
TOKEN=$(curl -s -X POST -H "authorization: token ${TOKEN}" "https://api.github.com/repos/${OWNER}/${REPO}/actions/runners/registration-token" | jq -r .token)
5+
6+
cleanup() {
7+
./config.sh remove --token "${TOKEN}"
8+
}
9+
10+
./config.sh \
11+
--url "https://github.com/${OWNER}/${REPO}" \
12+
--token "${TOKEN}" \
13+
--name "${NAME}" \
14+
--unattended \
15+
--work _work
16+
17+
./runsvc.sh
18+
19+
cleanup

packages/kdot-actions-runner/index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default {
2+
image: { repo: 'generates/actions-runner', tag: 'v1.0.0' },
3+
env: {},
4+
secrets: [
5+
{
6+
name: 'actions-runner-token',
7+
values: [
8+
{ TOKEN: 'ACTIONS_RUNNER_TOKEN' }
9+
]
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)