Skip to content

Commit

Permalink
Merge pull request #53 from OpsLevel/db/fix-custom-action-workflow-pt-2
Browse files Browse the repository at this point in the history
Db/fix custom action workflow pt 2
  • Loading branch information
davidbloss authored Dec 10, 2024
2 parents 582d594 + c3bd291 commit 928d02a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/custom_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup OpsLevel CLI
uses: opslevel/actions/setup-cli@v1
- name: Apply Terraform
- name: Mask inputs
run: |
OPSLEVEL_API_TOKEN=$(jq -r 'select(.client_payload.api_token or .inputs.api_token)' $GITHUB_EVENT_PATH)
SANDBOX_USER_EMAIL=$(jq -r 'select(.client_payload.user_email or .inputs.user_email)' $GITHUB_EVENT_PATH)
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)
echo "OPSLEVEL_API_TOKEN=$OPSLEVEL_API_TOKEN" >> $GITHUB_ENV
echo "SANDBOX_USER_EMAIL=$SANDBOX_USER_EMAIL" >> $GITHUB_ENV
- name: Apply Terraform
env:
OPSLEVEL_API_TOKEN: "${{ env.OPSLEVEL_API_TOKEN }}"
SANDBOX_USER_EMAIL: "${{ env.SANDBOX_USER_EMAIL }}"
run: |
task factory-reset -y
task apply-demo -- -auto-approve

0 comments on commit 928d02a

Please sign in to comment.