diff --git a/README.md b/README.md index 3f799aa..b343d1b 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,10 @@ You can also clone this repository and reference the chart's directory. This all ```bash # Authorization from Step 2: # Either GITHUB_PAT, OR all 3 of GITHUB_APP_* +export AUTH_TYPE=pat export GITHUB_PAT=c0ffeeface1234567890 # OR, GitHub App information: +export AUTH_TYPE=app export GITHUB_APP_ID=123456 export GITHUB_APP_INSTALL_ID=7890123 export GITHUB_APP_PEM='----------BEGIN RSA PRIVATE KEY...' @@ -79,6 +81,7 @@ export RELEASE_NAME=actions-runner # Installing using PAT Auth helm install $RELEASE_NAME openshift-actions-runner/actions-runner \ + --set-string authType=$AUTH_TYPE \ --set-string githubPat=$GITHUB_PAT \ --set-string githubOwner=$GITHUB_OWNER \ --set-string githubRepository=$GITHUB_REPO \ @@ -87,6 +90,7 @@ helm install $RELEASE_NAME openshift-actions-runner/actions-runner \ # OR, Installing using App Auth helm install $RELEASE_NAME openshift-actions-runner/actions-runner \ + --set-string authType=$AUTH_TYPE \ --set-string githubAppId=$GITHUB_APP_ID \ --set-string githubAppInstallId=$GITHUB_APP_INSTALL_ID \ --set-string githubAppPem="$GITHUB_APP_PEM" \ diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 027c1fb..0f36388 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -87,7 +87,7 @@ spec: {{- end }} # App Auth - {{- if .Values.githubAppId }} + {{- if eq .Values.authType "app" }} - name: GITHUB_APP_ID valueFrom: secretKeyRef: @@ -106,7 +106,7 @@ spec: {{- end }} # or, PAT Auth - {{- if .Values.githubPat }} + {{- if eq .Values.authType "pat" }} - name: GITHUB_PAT valueFrom: secretKeyRef: diff --git a/values.yaml b/values.yaml index f5249a3..591607a 100644 --- a/values.yaml +++ b/values.yaml @@ -12,6 +12,9 @@ githubRepository: "" # eg. github.mycompany.com githubDomain: "" +# Set to either "app" for GitHub App Auth, or "pat" for PAT Auth. See the sections below for config of each +authType: app + ### Values for PAT Auth ### Refer to https://github.com/redhat-actions/openshift-actions-runners#pat-guidelines