steam-deploy icon indicating copy to clipboard operation
steam-deploy copied to clipboard

Use Docker action instead of composite one

Open mikz opened this issue 3 years ago • 2 comments

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:

  • no need for multi platform shell script
  • faster, since no need of installing dependencies
  • in theory you can build your own image that is pre-updated and possibly has the sentry file and config already in it
  • you can try starting that container by yourself and see if the sentry file works

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

  • [x] Read the contribution guide and accept the code of conduct
  • [x] Readme (not needed)
  • [x] Tests (not needed)
  • [ ] Try it works on a real pipeline

mikz avatar Oct 05 '22 13:10 mikz

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.

davidmfinol avatar Oct 05 '22 15:10 davidmfinol

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.

webbertakken avatar Oct 05 '22 15:10 webbertakken

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?

MrFastwind avatar Oct 26 '22 17:10 MrFastwind

@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.

davidmfinol avatar Oct 29 '22 05:10 davidmfinol

@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 avatar Oct 29 '22 09:10 mikz

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

mikz avatar Oct 29 '22 09:10 mikz

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

davidmfinol avatar Jan 27 '23 17:01 davidmfinol

@davidmfinol to be honest I totally forgot about it!

But I've tried just now and it works.

mikz avatar Jan 27 '23 20:01 mikz

@davidmfinol 🚀 👍 🥇 Thank you for great project!

mikz avatar Jan 27 '23 21:01 mikz

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 avatar Nov 03 '23 02:11 wilg

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

wilg avatar Nov 03 '23 02:11 wilg