First of all, thanks for this GH-Action :-)
I'm using this action twice in my workflow because using a ssh-agent with multiple keys doesn't seem to work with the Gradle-plugin I'm using to push some data to Git-Repositories over ssh.
[...]
- uses: webfactory/ssh-agent@v0.3.0
with:
ssh-private-key: ${{ secrets.WORKFLOW_SSH_KEY }}
continue-on-error: true
- name: Push data, if there are any changes
run: ./gradlew gitPublishPush --info
- uses: webfactory/ssh-agent@v0.3.0
with:
ssh-private-key: ${{ secrets.WORKFLOW_SSH_KEY_ARCHIV_REPO }}
continue-on-error: true
- name: Archive the PDFs in a private repo
run: ./gradlew -b archive.gradle.kts gitPublishPush --info
This works fine, but I have to use continue-on-error because otherwise, the second post-run-action (which belongs to the first ssh-agent) fails:

Can I somehow trigger the post-run action manually at an earlier step?
Otherwise, I suggest to check in cleanup.js, if the process is already killed.
|
execSync('kill ${SSH_AGENT_PID}', { stdio: 'inherit' }) |
First of all, thanks for this GH-Action :-)
I'm using this action twice in my workflow because using a ssh-agent with multiple keys doesn't seem to work with the Gradle-plugin I'm using to push some data to Git-Repositories over ssh.
This works fine, but I have to use
continue-on-errorbecause otherwise, the second post-run-action (which belongs to the first ssh-agent) fails:Can I somehow trigger the post-run action manually at an earlier step?
Otherwise, I suggest to check in
cleanup.js, if the process is already killed.ssh-agent/cleanup.js
Line 7 in 8789658