mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
c
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: admin-user
|
||||
namespace: kubernetes-dashboard
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: admin-user
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: admin-user
|
||||
namespace: kubernetes-dashboard
|
||||
34
prereq.yaml
Normal file
34
prereq.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
namespace: default
|
||||
name: pod-patcher
|
||||
rules:
|
||||
- apiGroups: [""] # "" indicates the core API group
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "watch", "list", "patch"]
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: default-pod-patcher
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: pod-patcher
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: default
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: githubtoken
|
||||
type: Opaque
|
||||
stringData:
|
||||
GITHUB_PAT: "xxx"
|
||||
24
runners.yaml
24
runners.yaml
@@ -12,4 +12,26 @@ spec:
|
||||
template:
|
||||
spec:
|
||||
setupDockerInDocker: true
|
||||
imagePullPolicy: Always
|
||||
imagePullPolicy: Always
|
||||
runnerUpdateHandler:
|
||||
containers:
|
||||
- name: update-image
|
||||
image: huangtingluo/workflow_dispatch:latest
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: GITHUB_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: githubtoken
|
||||
key: GITHUB_PAT
|
||||
- name: GITHUB_OWNER
|
||||
value: tingluohuang
|
||||
- name: GITHUB_REPO
|
||||
value: "k8s-runner-image"
|
||||
- name: GITHUB_EXTRA_CURL_ARG
|
||||
value: "-v"
|
||||
- name: GITHUB_WORKFLOW
|
||||
value: "docker-publish.yml"
|
||||
- name: GITHUB_WORKFLOW_INPUTS
|
||||
value: "{\"runnerDownloadUrl\":\"https://github.com/TingluoHuang/runner/releases/download/test/actions-runner-linux-x64-2.299.0.tar.gz\"}"
|
||||
restartPolicy: Never
|
||||
@@ -507,7 +507,7 @@ namespace GitHub.Runner.Listener
|
||||
await jobStartInvoker.ExecuteAsync(
|
||||
workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Root),
|
||||
fileName: WhichUtil.Which("bash"),
|
||||
arguments: $"-c \"{jobStartNotification}\" JOBSTART \"{DateTime.UtcNow.ToString("O")}\"",
|
||||
arguments: $"-c \"{jobStartNotification} JOBSTART {DateTime.UtcNow.ToString("O")}\"",
|
||||
environment: null,
|
||||
requireExitCodeZero: true,
|
||||
outputEncoding: null,
|
||||
@@ -690,7 +690,7 @@ namespace GitHub.Runner.Listener
|
||||
await jobCompleteInvoker.ExecuteAsync(
|
||||
workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Root),
|
||||
fileName: WhichUtil.Which("bash"),
|
||||
arguments: $"-c \"{jobCompleteNotification}\" JOBCOMPLETE \"{DateTime.UtcNow.ToString("O")}\"",
|
||||
arguments: $"-c \"{jobCompleteNotification} JOBCOMPLETE {DateTime.UtcNow.ToString("O")}\"",
|
||||
environment: null,
|
||||
requireExitCodeZero: true,
|
||||
outputEncoding: null,
|
||||
@@ -771,7 +771,7 @@ namespace GitHub.Runner.Listener
|
||||
await jobRunningInvoker.ExecuteAsync(
|
||||
workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Root),
|
||||
fileName: WhichUtil.Which("bash"),
|
||||
arguments: $"-c \"{jobRunningNotification}\" JOBRUNNING \"{DateTime.UtcNow.ToString("O")}\"",
|
||||
arguments: $"-c \"{jobRunningNotification} JOBRUNNING {DateTime.UtcNow.ToString("O")}\"",
|
||||
environment: null,
|
||||
requireExitCodeZero: true,
|
||||
outputEncoding: null,
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace GitHub.Runner.Listener
|
||||
await runnerUpdateInvoker.ExecuteAsync(
|
||||
workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Root),
|
||||
fileName: WhichUtil.Which("bash"),
|
||||
arguments: $"-c \"{runnerUpdateNotification}\" RUNNERUPDATE \"{DateTime.UtcNow.ToString("O")}\"",
|
||||
arguments: $"-c \"{runnerUpdateNotification} RUNNERUPDATE {DateTime.UtcNow.ToString("O")}\"",
|
||||
environment: null,
|
||||
requireExitCodeZero: true,
|
||||
outputEncoding: null,
|
||||
|
||||
Reference in New Issue
Block a user