diff --git a/action.yaml b/action.yaml index 6c4cf08..649c3c5 100644 --- a/action.yaml +++ b/action.yaml @@ -79,7 +79,7 @@ runs: if: success() || steps.generator.conclusion == 'failure' shell: bash run: | - curl --fail --silent --show-error --header "X-Vault-Token: ${VAULT_TOKEN}" --data "" "${VAULT_SERVER}/v1/auth/token/revoke-self" + curl --fail --silent --show-error --header "X-Vault-Token: ${VAULT_TOKEN}" --data "" "${VAULT_SERVER%/}/v1/auth/token/revoke-self" env: VAULT_SERVER: ${{ inputs.vault_server }} VAULT_TOKEN: ${{ steps.vault_auth.outputs.vault_token }} diff --git a/generate-and-sign b/generate-and-sign index 2dad09a..5abf365 100755 --- a/generate-and-sign +++ b/generate-and-sign @@ -16,7 +16,7 @@ cd "$workdir" ssh-keygen -q -t ed25519 -N '' -f "./${keyfile}" pubkey=$(cat "$pubfile") -vault_server_url="${VAULT_SERVER}/v1/${SSH_BACKEND}/sign/${SSH_ROLE}" +vault_server_url="${VAULT_SERVER%/}/v1/${SSH_BACKEND}/sign/${SSH_ROLE}" curl \ --fail \ diff --git a/github-vault-auth b/github-vault-auth index 986d27d..876ea80 100755 --- a/github-vault-auth +++ b/github-vault-auth @@ -26,7 +26,7 @@ curl \ --connect-timeout 10 \ --output "$vault_response" \ --data '{"jwt": "'"$github_jwt"'", "role": "'"$ROLE"'"}' \ - "${VAULT_SERVER}/v1/auth/${BACKEND}/login" + "${VAULT_SERVER%/}/v1/auth/${BACKEND}/login" vault_token=$(jq --exit-status --raw-output .auth.client_token "$vault_response") echo "::add-mask::$vault_token"