Skip to content

Commit

Permalink
Use defaults from repo if not supplied to make testing easier
Browse files Browse the repository at this point in the history
  • Loading branch information
geofflamrock committed Aug 9, 2023
1 parent bf168b8 commit 78eec29
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/test-login.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ on:
inputs:
server:
type: string
description: The url of the Octopus Instance
required: true
description: The url of the Octopus Instance. Will default to repository variable TEST_INSTANCE_URL if not supplied.
service_account_id:
type: string
description: The id of the service account to login for
required: true
description: The id of the service account to login for. Will default to repository variable TEST_INSTANCE_SERVICE_ACCOUNT_ID if not supplied.
api_key:
type: string
description: The API key to login with
required: true
description: The API key to login with. Be careful this may be logged in plain text. Will default to repository secret TEST_INSTANCE_API_KEY if not supplied.

jobs:
login:
Expand All @@ -29,8 +26,8 @@ jobs:
uses: ./
id: oidc
with:
server: ${{ inputs.server }}
service_account_id: ${{ inputs.service_account_id }}
server: ${{ inputs.server || vars.TEST_INSTANCE_URL }}
service_account_id: ${{ inputs.service_account_id || vars.TEST_INSTANCE_SERVICE_ACCOUNT_ID }}

- name: Print Octopus credential environment variables from OIDC login
run: |
Expand All @@ -43,13 +40,15 @@ jobs:
uses: ./
id: api_key
with:
server: ${{ inputs.server }}
api_key: ${{ inputs.api_key }}
server: ${{ inputs.server || vars.TEST_INSTANCE_URL }}
api_key: ${{ inputs.api_key || secrets.TEST_INSTANCE_API_KEY }}

- name: Print Octopus credential environment variables from API Key login
run: |
echo "OCTOPUS_URL = $OCTOPUS_URL"
echo "OCTOPUS_API_KEY = $OCTOPUS_API_KEY"
echo "server = ${{ steps.api_key.outputs.server }}"
echo "api_key = ${{ steps.api_key.outputs.api_key }}"
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v3
Expand Down

0 comments on commit 78eec29

Please sign in to comment.