Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot execute steam-deploy twice in the same CI job #79

Open
soundasleep opened this issue Dec 1, 2024 · 2 comments
Open

Cannot execute steam-deploy twice in the same CI job #79

soundasleep opened this issue Dec 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@soundasleep
Copy link
Contributor

soundasleep commented Dec 1, 2024

Bug description

It seems that if you try to push to two branches in the same CI job, this action will fail in the second step with:

mkdir: cannot create directory ‘BuildOutput’: File exists

My guess is that at https://github.com/game-ci/steam-deploy/blob/main/steam_deploy.sh#L10 it's creating a new BuildOutput directory but it's never deleted.

How to reproduce

    - name: Deploy to Steam (branch1)
      uses: game-ci/steam-deploy@v3
      with:
        username: ...
        configVdf: ...
        appId: ...
        buildDescription: todo
        rootPath: desktop/build
        depot2Path: package/
        releaseBranch: branch1
    - name: Deploy to Steam (branch2)
      uses: game-ci/steam-deploy@v3
      with:
        username: ...
        configVdf: ...
        appId: ...
        buildDescription: todo
        rootPath: desktop/build
        depot2Path: package/
        releaseBranch: branch2

Expected behavior

It should be possible to push the same build to two Steam branches within the same CI job.

Additional details

Potential workarounds:

  • Maybe steam-deploy can rm -rf BuildOutput once the build has successfully uploaded
  • Or the BuildOutput directory name is randomly generated per build
  • Another workaround is probably running two CI jobs concurrently, one for each Steam branch, but Password: FAILED (Invalid Password) #62 (comment) reported that it may not be possible to upload two Steam branches at the same time
@soundasleep soundasleep added the bug Something isn't working label Dec 1, 2024
@soundasleep soundasleep changed the title Cannot execute action twice in the same CI run Cannot execute steam-deploy twice in the same CI run Dec 1, 2024
@soundasleep soundasleep changed the title Cannot execute steam-deploy twice in the same CI run Cannot execute steam-deploy twice in the same CI job Dec 1, 2024
@webbertakken
Copy link
Member

Did you try your suggestion of removing BuildOutput in between the steps?

If it resolves the issue we could maybe then add it to the start of the action.

@soundasleep
Copy link
Contributor Author

Yes! I had to do a bit of chowning first, otherwise the directory couldn't be deleted (it's created by root:root?) but this is my workaround:

    - name: Deploy to Steam (branch1)
      uses: game-ci/steam-deploy@v3
      with:
        username: ...
        configVdf: ...
        appId: ...
        buildDescription: todo
        rootPath: desktop/build
        depot2Path: package/
        releaseBranch: branch1
    - name: Delete BuildOutput folder
      run: |
        whoami
        ls -la
        ls -la BuildOutput
        sudo chown -R $USER:$USER BuildOutput
        ls -la
        ls -la BuildOutput
        rm -rf BuildOutput
    - name: Deploy to Steam (branch2)
      uses: game-ci/steam-deploy@v3
      with:
        username: ...
        configVdf: ...
        appId: ...
        buildDescription: todo
        rootPath: desktop/build
        depot2Path: package/
        releaseBranch: branch2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants