Skip to content

Commit 4f03ea6

Browse files
GitHub Action: Setup ssh properly
1 parent fb022dd commit 4f03ea6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ jobs:
2727
- name: Setup Git user
2828
uses: fregante/setup-git-user@v2
2929

30+
- name: Setup SSH Keys and known_hosts
31+
env:
32+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
33+
run: |
34+
mkdir -p ~/.ssh
35+
ssh-keyscan github.com >> ~/.ssh/known_hosts
36+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
37+
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
38+
3039
- name: Publish to GitHub Packages
3140
run: mvn -ntp -B release:prepare release:perform
3241
env:

0 commit comments

Comments
 (0)