Skip to content

Remove rm: true from SCP upload step in pipeline to prevent accidental file deletion #1904

@andreion1ca

Description

@andreion1ca

Summary
In the upload-unity-package job within the pipeline, the SCP upload step (appleboy/scp-action@v0.1.7) uses rm: true. This flag deletes all files in the target directory, which is problematic, as there are other important files in the directory that should be preserved.

Steps to reproduce

  1. Run the pipeline with the current workflow (upload-package-to-staging.yml).
  2. The artifact is uploaded using SCP with rm: true.
  3. All contents in the target directory at ${{ secrets.SDK_PATH }} are deleted before copying the artifact.

Relevant logs and/or screenshots
N/A

Expected result
Only the new Unity package files should be copied to the server. Other important files in the target directory should not be deleted.

Suggestion
Remove rm: true from the SCP upload step to prevent unintended file/folder deletion:

      - name: Upload AltTesterPackage
        uses: appleboy/scp-action@v0.1. 7
        with:
          source: AltTester/*
          target: ${{ secrets.SDK_PATH }}
          host: ${{ secrets.HOST_IP_ALTTESTER }}
          port: ${{ secrets.PORT_DEV_ALTTESTER }}
          username: ${{ secrets.USERNAME_ALTTESTER }}
          password: ${{ secrets.PASSWORD_ALTTESTER }}
          strip_components: 1

(removed rm: true)

Please consider the impact for both current and future workflows using this directory.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions