Skip to content

Commit d752308

Browse files
committed
Add workflow-dispatch to cache maven packages to master
1 parent 99f2e6e commit d752308

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Cache maven packages on master
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag_name:
6+
description: 'Tag to build on ubigu/oskari-server'
7+
required: true
8+
type: string
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
repository: ubigu/oskari-server
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
ref: refs/tags/${{ inputs.tag_name }}
22+
- name: 'Pull package utils from this repo'
23+
uses: actions/checkout@v4
24+
with:
25+
path: packageutils
26+
27+
- name: 'Apply patches from package utils'
28+
run: for i in packageutils/patches/*.patch; do git apply $i; done
29+
30+
- uses: actions/setup-java@v4
31+
with:
32+
java-version: '11'
33+
distribution: 'temurin'
34+
cache: 'maven'
35+
36+
- name: Fetch dependencies
37+
run: mvn --batch-mode dependency:resolve dependency:resolve-plugins

.github/workflows/deploy-to-github.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
path: packageutils
2424

2525
- name: 'Apply patches from package utils'
26-
run: git apply packageutils/patches/oskari-pom.xml-deploy.patch
26+
run: for i in packageutils/patches/*.patch; do git apply $i; done
2727

2828
- uses: actions/setup-java@v4
2929
with:

0 commit comments

Comments
 (0)