From f8c5b10d1fd7bec7c558e7ad3bd240f3ac37d99c Mon Sep 17 00:00:00 2001 From: Dan Foster Date: Mon, 9 Sep 2024 14:34:41 +0100 Subject: [PATCH 1/2] Add explict setting for APP vs PAT auth --- templates/deployment.yaml | 4 ++-- values.yaml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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 From 96ecfb88cda7677297a84bfe0f81f213cfa0d63a Mon Sep 17 00:00:00 2001 From: Dan Foster Date: Mon, 9 Sep 2024 14:41:50 +0100 Subject: [PATCH 2/2] Add explict setting for APP vs PAT auth --- README.md | 4 ++++ 1 file changed, 4 insertions(+) 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" \