game-ci / steam-deploy

Github Action to deploy a game to Steam
MIT License
229 stars 65 forks source link

GitHub Secret "Value is too large" Error for STEAM_CONFIG_VDF #77

Closed amanao closed 1 month ago

amanao commented 1 month ago

Hello,

I followed the instructions in the README:

"The folder from which you run steamcmd will now contain an updated config/config.vdf file. Use cat config/config.vdf | base64 > config_base64.txt to encode the file. Copy the contents of config_base64.txt to a GitHub Secret STEAM_CONFIG_VDF."

I executed the command on bash and generated the config_base64.txt file. However, when I attempted to paste the contents of config_base64.txt into the GitHub Actions Repository secrets, I encountered an error message: "Value is too large."

Could you please advise on how to resolve this issue?

Thank you.

davidmfinol commented 1 month ago

One solution that another user had was to gzip the file before base64. Discord thread: https://discord.com/channels/710946343828455455/1212013671547670568 Details:

commit 97b460c809537dc43c83ff9ced6daef8fda14420
Author: Mike Miller <github@mikeage.net>
Date:   Thu Sep 26 15:01:14 2024 +0300

    gzip config.vdf before storing as a secret

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c867f9e1..0ccad022 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -581,7 +581,7 @@ jobs:
       - name: Restore steam login config
         run: |
           mkdir -p /home/runner/Steam/config
-          echo "${{ secrets.STEAM_CONFIG_VDF}}" | base64 -d - > /home/runner/Steam/config/config.vdf
+          echo "${{ secrets.STEAM_CONFIG_VDF}}" | base64 -d - | gunzip - > /home/runner/Steam/config/config.vdf
           md5sum /home/runner/Steam/config/config.vdf
       - name: Download Build Artifacts (Windows)
         uses: actions/download-artifact@v4
@@ -605,7 +605,7 @@ jobs:
           CHANNEL: beta
       - name: Update steam login secret
         run: |
-          base64 -i /home/runner/Steam/config/config.vdf | gh secret set --visibility all --org icosa-foundation STEAM_CONFIG_VDF
+          gzip /home/runner/Steam/config/config.vdf -c | base64 | gh secret set --visibility all --org icosa-foundation STEAM_CONFIG_VDF
           md5sum /home/runner/Steam/config/config.vdf
         env:
           GITHUB_TOKEN: ${{ secrets.SECRET_UPDATER_PAT }}
amanao commented 1 month ago

Thank you for the suggestion! I will try gzipping the file before base64 encoding it.

amanao commented 1 month ago

Thank you! I was able to do it this way 👍