Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explict setting for APP vs PAT auth #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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...'
Expand All @@ -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 \
Expand All @@ -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" \
Expand Down
4 changes: 2 additions & 2 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
{{- end }}

# App Auth
{{- if .Values.githubAppId }}
{{- if eq .Values.authType "app" }}
- name: GITHUB_APP_ID
valueFrom:
secretKeyRef:
Expand All @@ -106,7 +106,7 @@ spec:
{{- end }}

# or, PAT Auth
{{- if .Values.githubPat }}
{{- if eq .Values.authType "pat" }}
- name: GITHUB_PAT
valueFrom:
secretKeyRef:
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down