Comments (7)
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.
from rsync-deployments.
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.
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.
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.
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.
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.
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)
- Suggested additions to readme HOT 2
- Syntax error in command? HOT 2
- Job doesn't fail if SSH Key Passphrase is wrong HOT 1
- rsync deployment resulting in fail because received data is less than sent data HOT 2
- kex_exchange_identification: Connection closed by remote host HOT 1
- Run with rsh option fails HOT 2
- Fails inside containers due to reliance on $GITHUB_WORKSPACE HOT 1
- Permission denied HOT 1
- Passing an empty Github Action variable to `remote_path` circumvents validation and targets the root `/` directory HOT 2
- Rsync missing HOT 1
- (GitTea) No files are copied HOT 6
- I receive rsync: connection unexpectedly closed (0 bytes received so far) [sender] when using the library HOT 1
- Unable to negotiate with *** port ***: no matching host key type found. HOT 4
- Support teleport connection
- How can I connect to the local IP? There is no public IP.
- sync HOT 3
- Permission denied HOT 12
- rsync: [sender] link_stat "/github/workspace/rsync" failed: No such file or directory HOT 1
- rsync Not Found? HOT 1
- Support rsync protocol HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsync-deployments.