Update gosu package as its having vulnerabilities (#97) #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
branches: [ main, "3.x" ] | |
workflow_dispatch: | |
jobs: | |
docker-build-push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
versions: | |
- CONTEXT: . | |
TAGS: | |
- wiremock/wiremock:3x | |
- ghcr.io/wiremock/wiremock:3x | |
PLATFORMS: | |
- linux/amd64 | |
- linux/arm64 | |
- linux/arm/v7 | |
- CONTEXT: alpine | |
TAGS: | |
- wiremock/wiremock:3x-alpine | |
- ghcr.io/wiremock/wiremock:3x-alpine | |
PLATFORMS: | |
- linux/amd64 | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
if: ${{ matrix.versions.CONTEXT != 'alpine' }} | |
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 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: wiremockbot | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: wiremock | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build WireMock Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{ matrix.versions.CONTEXT }} | |
load: true | |
tags: ${{ matrix.versions.TAGS[0] }} | |
- 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] }}" | |
- name: Test WireMock Docker image with SSL | |
run: | | |
docker container run -d --name test -p 8443:8443 ${{ matrix.versions.TAGS[0] }} --https-port 8443 | |
timeout 10 bash -c 'while ! curl --fail --insecure https://localhost:8443/__admin/; do sleep 1; done' | |
docker container rm -f test | |
- name: Push Wiremock Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{ matrix.versions.CONTEXT }} | |
platforms: ${{ join(matrix.versions.PLATFORMS, ',') }} | |
push: true | |
tags: ${{ join(matrix.versions.TAGS, ',') }} |