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

fix: don't try to mask the admin key #8

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Node and StepZen CLI must be installed, see [stepzen-dev/stepzen-install action]

- `domain` - StepZen domain (defaults to stepzen.net)
- `account` - StepZen account name
- `adminkey` - Admin key of the StepZen account
- `adminkey` - Admin key of the StepZen account. If the workflow does not pull the key from GitHub secrets then it must ensure the key is masked using `::add-mask::`.

## Outputs

- `domain` - StepZen domain
- `account` - StepZen account name
- `apikey` - API key for the account (not the admin key)
- `apikey` - API key for the account (not the admin key). The value is masked using `::add-mask::`.

## Example

Expand Down
10 changes: 2 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright IBM Corp. 2023
# Copyright IBM Corp. 2023, 2024
# Made available under the MIT License

name: "Login to StepZen Server"
Expand All @@ -15,7 +15,7 @@ inputs:
description: "StepZen account name"
required: true
adminkey:
description: "Admin key of the StepZen account"
description: "Admin key of the StepZen account - ensure key is masked or comes from GitHub secrets"
required: true

outputs:
Expand All @@ -32,12 +32,6 @@ outputs:
runs:
using: "composite"
steps:
# Don't assume the admin key came from a secret so mask it for safety
- name: mask
shell: bash
run: |
adminkey=${{ inputs.adminkey }}
echo "::add-mask::${adminkey}"
- name: "login"
run: |
stepzen login ${{ inputs.domain }} --account ${{ inputs.account }} --adminkey ${{ inputs.adminkey }}
Expand Down