Skip to content

Merge pull request #117 from wiremock/better-snyk-scanning #134

Merge pull request #117 from wiremock/better-snyk-scanning

Merge pull request #117 from wiremock/better-snyk-scanning #134

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- CONTEXT: .
TAGS:
- wiremock/wiremock:test
PLATFORMS:
- linux/amd64
- linux/arm64
- linux/arm/v7
- CONTEXT: alpine
TAGS:
- wiremock/wiremock:test-alpine
PLATFORMS:
- linux/amd64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- 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 }}
platforms: ${{ join(matrix.versions.PLATFORMS, ',') }}
push: false
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] }}"
container-image-scan:
uses: ./.github/workflows/container-image-scan.yml
needs: docker-build
with:
image_version: latest
secrets: inherit