game-ci / steam-deploy

Github Action to deploy a game to Steam
MIT License
227 stars 63 forks source link

Use Docker action instead of composite one #46

Closed mikz closed 1 year ago

mikz commented 2 years ago

Changes

I've migrated steam-deploy to use a steamcmd docker image: https://github.com/CM2Walki/steamcmd It is even mentioned by Valve in their guide: https://developer.valvesoftware.com/wiki/SteamCMD#Docker

This has several benefits in my point of view:

I've also added a a check that verifies that the login actually works before trying to do the upload (which would hang if not logged in).

I'm in a process of using this to release to steam, so I'll mark it as ready once I verify it all works from start to finish.

Checklist

davidmfinol commented 2 years ago

I agree that this approach is better.

Once you can confirm that it works with the GitHub runners, it'd be good to also have @wilg confirm that this change doesnt break for his self-hosted mac and windows runners.

webbertakken commented 2 years ago

Thank you so much for picking this up. This is exactly the direction we want to go in. Optionally using TS/Deno or Go to reduce the amount of bash scripting.

In fact it already used to be inside a docker image In the very first version of this action.

There were some hiccups in the previous implementation though. So before merging this we'll have to test that people from all platforms are able to pass the 2fa and upload their build successfully.

MrFastwind commented 2 years ago

as reported in this issue #48 in the setup.sh at line 114 in last commit (9226c2d6d34eb249ac56c30893fc1bd253a28e5a)

$STEAM_CMD +set_steam_guard_code "INVALID" +login "$steam_username" "$steam_password"  +quit;

this stops the script every time, because steam would try using steam guard code (that is "INVALID") even if ssfn files are already present. would a test to check if it should use steam guard code or ssfn files needed, before trying? also would "INVALID" be converted in a proper action variable? at the end, is this pr abandoned (21 days last update)? would be better if someone else fix it?

davidmfinol commented 2 years ago

@MrFastwind Thanks for testing.

Agreed that it may be better if someone else continued iterating on this, so I've created https://github.com/game-ci/steam-deploy/issues/50 to at least try and track it.

mikz commented 2 years ago

@MrFastwind interesting. It works for me just fine. INVALID does not mean anything, it is there so it is obviously invalid code. Because otherwise it will wait for user input to put in the code, which is not desired in automation workflow.

That steam code is used (according to my testing) only when your ssn file can't make a proper login. I could not reuse the ssn file between my macOS and the linux version, so using the steamcmd docker container to get the ssn file saved me. And then it works like a charm.

We're using https://github.com/game-ci/steam-deploy/compare/main...timewarpinc:steam-deploy:docker in production (different branch from this). There is a diference between this and that branch in permissions, so the other one does not work locally in https://github.com/nektos/act. I'll rewrite this PR to have what we have in production without the extra logging.

mikz commented 2 years ago

I've updated the PR and merged main, I'll be able change our pipeline to this next week and verify it works.

davidmfinol commented 1 year ago

Hi @mikz, were you able to confirm if this works for you?

mikz commented 1 year ago

@davidmfinol to be honest I totally forgot about it!

But I've tried just now and it works.

mikz commented 1 year ago

@davidmfinol 🚀 👍 🥇 Thank you for great project!

wilg commented 1 year ago

Apologies for the late response, I missed the original mention.

Unfortunately this does break the action on Windows, as GitHub Actions do not support Docker on Windows at all. I get "Error: Container action is only supported on Linux".

wilg commented 1 year ago

I cherry-picked the required Steam MFA changes from main onto the code immediately before this PR, which works for now. You can use it with wilg/steam-deploy@steam-fix-windows and view that change here https://github.com/game-ci/steam-deploy/compare/main...wilg:steam-deploy:steam-fix-windows