Skip to content

Commit

Permalink
Deploy SNAPSHOT to maven.bang.priv.no from github actions master bran…
Browse files Browse the repository at this point in the history
…ch CI build
  • Loading branch information
steinarb committed Apr 7, 2024
1 parent 5c74dc7 commit fa299f9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<settings>
<servers>
<server>
<id>ssh-maven-travis</id>
<username>${env.REPO_USER}</username>
<privateKey>/home/runner/.ssh/github_actions</privateKey>
<configuration>
<strictHostKeyChecking>no</strictHostKeyChecking>
<preferredAuthentications>publickey,password</preferredAuthentications>
<interactive>false</interactive>
</configuration>
</server>
</servers>
</settings>
12 changes: 12 additions & 0 deletions .github/workflows/ukelonn-maven-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,20 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Add ssh key
run: |
mkdir -p /home/runner/.m2
cp .github/workflows/settings.xml /home/runner/.m2
mkdir -p /home/runner/.ssh
ssh-keyscan maven.bang.priv.no >> /home/runner/.ssh/known_hosts
echo "${{ secrets.MAVEN_SSH_KEY }}" > /home/runner/.ssh/github_actions
chmod 600 /home/runner/.ssh/github_actions
- name: Build with Maven
run: mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent install coveralls:report sonar:sonar --file pom.xml --define repoToken=${{ secrets.COVERALLS_REPO_SECRET }} -Dsonar.projectKey=steinarb_ukelonn -Dsonar.organization=steinarb -Dsonar.host.url=https://sonarcloud.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Deploy snapshot to maven repo
run: mvn -B deploy -DskipTests=true
env:
REPO_USER: ${{ secrets.REPO_USER }}

0 comments on commit fa299f9

Please sign in to comment.