Skip to content

Commit ac1433d

Browse files
authored
Configure deploy to Artifactory for branch 1.x (#230)
1 parent 745cd5d commit ac1433d

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/push.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,36 @@ jobs:
4141
${{ runner.os }}-
4242
4343
- name: Run maven build
44-
run: mvn package -s .github/workflows/settings.xml
44+
run: mvn package -s .github/workflows/settings.xml
45+
deploy-artifactory:
46+
if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/1.x'
47+
needs: [ maven-package ]
48+
runs-on: ubuntu-24.04
49+
steps:
50+
- uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 0
53+
- name: Install xmlstarlet
54+
run: |
55+
sudo rm -rf /var/lib/apt/lists/*
56+
sudo apt-get update
57+
sudo apt-get -y install xmlstarlet
58+
- name: Copy maven settings
59+
run: |
60+
wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml
61+
- uses: actions/setup-java@v4
62+
with:
63+
java-version: 8.0.452+9
64+
distribution: temurin
65+
- name: Cache Maven dependencies
66+
uses: actions/cache@v4
67+
with:
68+
path: ~/.m2/repository
69+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
70+
restore-keys: |
71+
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
72+
${{ runner.os }}-maven-
73+
${{ runner.os }}-
74+
75+
- name: Deploy to Entur Artifactory
76+
run: mvn deploy -s .github/workflows/settings.xml -DskipTests

0 commit comments

Comments
 (0)