Closed multimeric closed 4 years ago
Ah, seems that this is orthogonal to this particular action. It can be solved by using actions/checkout
to clone and ad-m/github-push-action
to push, e.g.
- uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.DeployKey }}
- uses: actions/checkout@v2
name: Checkout the other repo
with:
path: SomeRepo
ref: master
repository: 'org/SomeRepo'
- name: Commit files
run: |
cd SomeRepo
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update"
- name: Push changes
uses: ad-m/github-push-action@master
with:
directory: SomeRepo
github_token: ${{ secrets.GITHUB_TOKEN }}
This might be obvious, but I'm having a lot of trouble using an SSH key (a deploy key) using this action. I have the following workflow (fragment):
However that gives me:
I know the deploy key works, and I also know it's correctly inserted as a secret. Any idea why this might be happening?