Skip to content

Commit 3703da1

Browse files
Update and rename pull-requests.yml to build-pr.yml
1 parent ed27d44 commit 3703da1

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

.github/workflows/build-pr.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pull request bygg
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- '**.md'
7+
- '**.MD'
8+
- '.gitignore'
9+
- 'LICENCE'
10+
- 'CODEOWNERS'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-java@v1
18+
with:
19+
java-version: '11.x'
20+
- name: Set cache key
21+
run: |
22+
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)-${{ github.event.pull_request.number }}" >> $GITHUB_ENV
23+
echo "PREVIOUS_CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
24+
- uses: actions/cache@v2
25+
with:
26+
path: ~/.m2
27+
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
30+
31+
- name: Build
32+
run: mvn verify

.github/workflows/pull-requests.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)