Skip to content

Commit

Permalink
Merge pull request #52 from OpsLevel/db/fix-mask-variable
Browse files Browse the repository at this point in the history
fix mask inputs in github workflow
  • Loading branch information
davidbloss authored Dec 10, 2024
2 parents cceed85 + 93bf79d commit 582d594
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/custom_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,11 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup OpsLevel CLI
uses: opslevel/actions/setup-cli@v1
- name: Mask Access Token - from Github
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "::add-mask::$API_TOKEN"
echo "API_TOKEN=${{ github.event.inputs.api_token }}" >> $GITHUB_ENV
echo "USER_EMAIL=${{ github.event.inputs.user_email }}" >> $GITHUB_ENV
- name: Mask Access Token - from OpsLevel
if: ${{ github.event_name == 'repository_dispatch' }}
run: |
echo "::add-mask::$API_TOKEN"
echo "API_TOKEN=${{ github.event.client_payload.api_token }}" >> $GITHUB_ENV
echo "USER_EMAIL=${{ github.event.client_payload.user_email }}" >> $GITHUB_ENV
- name: Apply Terraform
env:
OPSLEVEL_API_TOKEN: "${{ env.API_TOKEN }}"
SANDBOX_USER_EMAIL: "${{ env.USER_EMAIL }}"
run: |
echo "::add-mask::$OPSLEVEL_API_TOKEN"
echo "::add-mask::$SANDBOX_USER_EMAIL"
export OPSLEVEL_API_TOKEN=$(jq -r 'select(.client_payload.api_token or .inputs.api_token)' $GITHUB_EVENT_PATH)
export SANDBOX_USER_EMAIL=$(jq -r 'select(.client_payload.user_email or .inputs.user_email)' $GITHUB_EVENT_PATH)
task factory-reset -y
task apply-demo -- -auto-approve
7 changes: 4 additions & 3 deletions modules/demo_account/users.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module "people" {
resource "opslevel_user" "user" {
for_each = { for user in var.account_users : split("@", user)[0] => user }

name = each.value
email = each.value
role = "admin"
name = each.value
email = each.value
role = "admin"
skip_welcome_email = false
}

0 comments on commit 582d594

Please sign in to comment.