Skip to content

Commit

Permalink
trying to set up ssh inside github runner
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanJCummings committed Dec 3, 2024
1 parent 191a3a5 commit 25e46ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
- uses: actions/checkout@v4
with:
ref: cicd-test
ssh-key: "${{ secrets.MSUSEL_CI_BOT_SSH_KEY }}"

# java/maven setup
- name: Set up JDK 11
Expand All @@ -65,10 +64,19 @@ jobs:
distribution: temurin
java-version: 11

- name: Set up ssh key authentication to maven repo
run: |
mdkir -p ~/.ssh
echo "${{ secrets.MSUSEL_CI_BOT_SSH_KEY }}" > ~/.ssh/msusel_ci_bot_key
chmod 600 ~/.ssh/msusel_ci_bot_key
ssh-keyscan github.com >> ~/.ssh/known_hosts
eval $(ssh-agent -s)
ssh-add ~/.ssh/msusel_ci_bot_key
- name: deploy to MSUSEL maven repository
run: |
git config --global user.name "${{ secrets.CI_BOT_USERNAME }}"
git config --global user.name "${{ secrets.CI_BOT_USERNAME }}
git config --global user.email "${{ secrets.CI_BOT_EMAIL }}"
git config --global init.defaultBranch master
mvn --batch-mode -f pom.xml clean deploy -Dmaven.test.skip=true
Expand Down

0 comments on commit 25e46ac

Please sign in to comment.