Skip to content

Commit 1570089

Browse files
committed
Configure deploy to Artifactory
1 parent 9ea25fb commit 1570089

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/push.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml
2929
- uses: actions/setup-java@v4
3030
with:
31-
java-version: 17.0.13
31+
java-version: 17.0.15
3232
distribution: temurin
3333
- name: Cache Maven dependencies
3434
uses: actions/cache@v4
@@ -59,3 +59,37 @@ jobs:
5959
-Dsonar.host.url=https://sonarcloud.io \
6060
-Dsonar.token=${SONAR_TOKEN}
6161
62+
deploy-artifactory:
63+
if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/master'
64+
needs: [maven-package]
65+
runs-on: ubuntu-24.04
66+
steps:
67+
- uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0
70+
- name: Install xmlstarlet
71+
run: |
72+
sudo rm -rf /var/lib/apt/lists/*
73+
sudo apt-get update
74+
sudo apt-get -y install xmlstarlet
75+
- name: Copy maven settings
76+
run: |
77+
wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml
78+
- uses: actions/setup-java@v4
79+
with:
80+
java-version: 17.0.15
81+
distribution: liberica
82+
- name: Cache Maven dependencies
83+
uses: actions/cache@v4
84+
with:
85+
path: ~/.m2/repository
86+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
87+
restore-keys: |
88+
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
89+
${{ runner.os }}-maven-
90+
${{ runner.os }}-
91+
92+
- name: Deploy to Entur Artifactory
93+
run: mvn deploy -s .github/workflows/settings.xml -DskipTests
94+
95+

0 commit comments

Comments
 (0)