Skip to content

Commit

Permalink
Ref #14 masking inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Oct 19, 2024
1 parent d0a6391 commit 2cff40e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/deploy-vpn-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
- id: mask-ansible_vault_password
name: Mask ansible_vault_password
run: |
echo "::add-mask::${{ inputs.ansible_vault_password }}"
echo "ansible_vault_password=$the_secret" >> "$GITHUB_OUTPUT"
ansible_vault_password=$(jq -r '.inputs.ansible_vault_password' $GITHUB_EVENT_PATH)
echo ::add-mask::$ansible_vault_password
echo "ansible_vault_password=$ansible_vault_password" >> "$GITHUB_OUTPUT"
- name: Verify ansible_vault_password mask
run: |
echo "the ansible_vault_password is ${{ steps.mask-ansible_vault_password.outputs.ansible_vault_password }}"
echo "the ansible_vault_password is ${{ env.ansible_vault_password }}"
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -37,7 +38,7 @@ jobs:
echo Creating ANSIBLE_VAULT_PASSWORD_FILE
TMPFILE=$(mktemp)
trap "rm -f ${TMPFILE@Q}" EXIT
echo -n "${{ inputs.ansible_vault_password }}" > $TMPFILE
echo -n "${{ env.ansible_vault_password }}" > $TMPFILE
export ANSIBLE_VAULT_PASSWORD_FILE=$TMPFILE
echo Run deploy vpn playbook
Expand Down

0 comments on commit 2cff40e

Please sign in to comment.