Giter Site home page Giter Site logo

Comments (7)

cwilby avatar cwilby commented on July 3, 2024 1

FYI - I found a solution I'm happy with 🎉

A GitHub workflow has many Jobs, and each Job can specify which runner it should run on.

Instead of one job, I now run Test/Build on the self hosted runner, and Deploy on a GitHub hosted runner.

The Build script uses https://github.com/actions/upload-artifact to upload the build output to the workflow.

The Deploy script uses https://github.com/actions/download-artifact to download the build output from the workflow, and then uses this rsync action successfully to push to environments.

image

from rsync-deployments.

cwilby avatar cwilby commented on July 3, 2024

Ok, I managed to get my CI process working, but no solution to this problem yet.

When rsync runs on the runners runtime, it is able to find and sync those files.

from rsync-deployments.

Burnett01 avatar Burnett01 commented on July 3, 2024

Ok, I managed to get my CI process working, but no solution to this problem yet.

When rsync runs on the runners runtime, it is able to find and sync those files.

Hello @cwilby, thank's for reaching out. It is interesting to know that all your intended files are synced when running the action on the runners runtime but not on your self-hosted runner.
Are there any rsync switches active or filters?

from rsync-deployments.

cwilby avatar cwilby commented on July 3, 2024

Thanks for responding - here is the build step, the switches are -avzr --delete.

      - name: Deploy build artifact
        if: github.ref == 'refs/heads/develop'
        uses: burnett01/[email protected]
        with:
          switches: -avzr --delete
          path: public/
          remote_path: ${{ secrets.SSH_PATH }}
          remote_host: ${{ secrets.SSH_HOST }}
          remote_user: ${{ secrets.SSH_USER }}
          remote_key: ${{ secrets.SSH_KEY }}

from rsync-deployments.

cwilby avatar cwilby commented on July 3, 2024

I've discovered the issue is related to running self hosted runners using Docker, where the runner container shares a Docker daemon with the host.

The issue is that the when the volume is mounted to the container that runs this action, the mount point is from the host operating systems perspective, not the runner containers perspective (which contains the build output).

This is only a problem when running self hosted runners using Docker.

from rsync-deployments.

Burnett01 avatar Burnett01 commented on July 3, 2024

Congrats @cwilby for solving this issue and for investigating. I am glad you figured it out and thank you for your contribution! I have pinned this issue and added the documentation label, in case anyone else runs into the same problem.
Using separate runners on each job combined with the artifacts actions is a straightforward way of dealing with your usecase.

Have a great week,
greetings
Steve

from rsync-deployments.

cwilby avatar cwilby commented on July 3, 2024

Additionally using https://github.com/marketplace/actions/delete-artifact to delete artifacts at the end of each build (I don't need to keep them around) to prevent taking up space I don't need.

from rsync-deployments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.