Skip to content

refactor input #1

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

Merged
merged 1 commit into from
Nov 14, 2021
Merged
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
12 changes: 0 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,15 @@ runs:
shell: bash
env:
INPUT_ORKAUSER: ${{ inputs.orkaUser }}
INPUT_ORKAIP: ${{ inputs.orkaIP }}
INPUT_ORKAPASS: ${{ inputs.orkaPass }}
INPUT_ORKABASEIMAGE: ${{ inputs.orkaBaseImage }}
INPUT_GITHUBUSER: ${{ inputs.githubUser }}
INPUT_GITHUBREPONAME: ${{ inputs.githubRepoName }}
INPUT_GITHUBPAT: ${{ inputs.githubPat }}
VPN_PASSWORD: ${{ inputs.vpnPassword }}
VPN_USER: ${{ inputs.vpnUser }}
VPN_ADDRESS: ${{ inputs.vpnAddress }}
VPN_SERVER_CERT: ${{ inputs.vpnServerCert }}
VM_NAME: ${{ inputs.vmName }}
inputs:
orkaIP:
description: "Your Orka IP"
required: true
orkaUser:
description: "Your Orka username"
required: true
Expand All @@ -34,15 +28,9 @@ inputs:
orkaBaseImage:
description: "The Orka base image name"
required: true
githubUser:
description: "Your GitHub username"
required: true
githubPat:
description: "Your GitHub personal access token"
required: true
githubRepoName:
description: "Name of your repo"
required: true
vpnPassword:
description: "Your VPN password"
required: true
Expand Down
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ def __init__(self):
self.orka_address = f"http://{orka_ip}"
self.orka_user = os.environ["INPUT_ORKAUSER"]
self.orka_pass = os.environ["INPUT_ORKAPASS"]
self.github_user = os.environ["INPUT_GITHUBUSER"]
self.github_pat = os.environ["INPUT_GITHUBPAT"]
self.github_repo_name = os.environ["INPUT_GITHUBREPONAME"]
repo_and_user_name = os.environ["GITHUB_REPOSITORY"].split('/')
self.github_repo_name = repo_and_user_name[1]
self.github_user = repo_and_user_name[0]
self.gh_session = requests.Session()
self.gh_session.auth = (self.github_user, self.github_pat)

Expand Down