-
Notifications
You must be signed in to change notification settings - Fork 104
56 lines (48 loc) · 1.58 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on:
push:
branches: [ "main", "3.x" ]
pull_request:
branches: [ "main", "3.x" ]
workflow_dispatch:
jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- CONTEXT: .
TAGS:
- wiremock/wiremock:test
- CONTEXT: alpine
TAGS:
- wiremock/wiremock:test-alpine
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Checkout sources
uses: actions/checkout@main
# TODO: Re-enable if rate limit becomes an issues
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: wiremock
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build Wiremock Docker image
uses: docker/build-push-action@v4
with:
context: ${{ matrix.versions.CONTEXT }}
load: true
file: ${{ matrix.versions.CONTEXT }}/Dockerfile
tags: ${{ matrix.versions.TAGS[0] }}
- name: Build Wiremock Docker image
run: docker buildx build --tag ${{ matrix.versions.TAGS[0] }} --load ${{ matrix.versions.CONTEXT }} --file ${{ matrix.versions.CONTEXT }}/Dockerfile
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: maven
- name: Run integration test
working-directory: test/integration-tests
run: mvn -B -ntp package verify --file pom.xml -DargLine="-Dit.wiremock-image=${{ matrix.versions.TAGS[0] }}"