Reputation: 5789
I'm trying to work out how to use Github Actions to checkout a remote public repo, then add some some sensitive files into it from the current repo, before finally building etc.
I believe I can checkout a remote repo with
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: foo-user/bar-repo
But how do I then copy some files into this checked out repo from files that are in the current repo?
Upvotes: 23
Views: 30527
Reputation: 43108
You have a couple options:
Checkout your repo and then checkout the public repo:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: foo-user/bar-repo
path: './bar'
Now you can go ahead and copy files from the folder bar
into whereever else you want
The other option is to have the public repo as a submodule, then you can simply do:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
Upvotes: 29