Skip to content

Commit 288ee30

Browse files
authored
Add password input (#87)
When using TOTP, a password is required to login. While steamcmd is perfectly fine with accepting the password as part of the username input (separated with a space), the way this action is set up, the second steamcmd invocation where the upload happens would then also use the password, causing steamcmd to error because the password was provided without the TOTP code. Rather than use the TOTP code there again (as proposed in #86), add the password in the test step (which will cache the credentials), and retain it from the upload step. In the configVdf case, the password will be empty, and steamcmd will ignore it, keeping the previous mechanics.
1 parent 2d5b9ce commit 288ee30

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ jobs:
8181
8282
The username of the Steam Build Account that you created in setup step 1.
8383
84+
#### password
85+
86+
The password of the Steam Build Account. Both this and `totp` are required together, see below.
87+
8488
#### totp
8589

8690
Deploying to Steam using TOTP. If this is not passed, `configVdf` is required.

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ inputs:
66
required: true
77
default: ''
88
description: 'The username of your builder account.'
9+
password:
10+
required: false
11+
description: 'The password of your builder account. Required if `totp` is set.'
912
totp:
1013
required: false
1114
description: 'The TOTP to use for login. If set, `configVdf` will be ignored.'
@@ -94,6 +97,7 @@ runs:
9497
image: Dockerfile
9598
env:
9699
steam_username: ${{ inputs.username }}
100+
steam_password: ${{ inputs.password }}
97101
steam_totp: ${{ inputs.totp }}
98102
configVdf: ${{ inputs.configVdf }}
99103
appId: ${{ inputs.appId }}

steam_deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ echo "# Test login #"
138138
echo "#################################"
139139
echo ""
140140

141-
steamcmd +set_steam_guard_code "$steam_totp" +login "$steam_username" +quit;
141+
steamcmd +set_steam_guard_code "$steam_totp" +login "$steam_username" "$steam_password" +quit;
142142

143143
ret=$?
144144
if [ $ret -eq 0 ]; then

0 commit comments

Comments
 (0)