Skip to content

build: re-schedule automated job #537

build: re-schedule automated job

build: re-schedule automated job #537

Workflow file for this run

name: Test Docker image
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version: [8, 11, 17, 21]
java-type: [jdk, jre]
node-version: [18, 20, 22]
variant: [default, alpine]
steps:
- uses: actions/[email protected]
- name: Build and test Docker image
run: |
VARIANT_PATH="${{ matrix.variant == 'alpine' && '/alpine' || '' }}"
IMAGE_PATH="${{ matrix.java-version }}/${{ matrix.java-type }}/${{ matrix.node-version }}${VARIANT_PATH}"
VARIANT_LABEL="${{ matrix.variant == 'alpine' && ' alpine' || '' }}"
JAVA_TYPE=$(echo "${{ matrix.java-type }}" | tr '[:lower:]' '[:upper:]')
printf "\n\n${JAVA_TYPE}${{ matrix.java-version }} with Node.js ${{ matrix.node-version }}${VARIANT_LABEL}\n"
# Run container and capture version outputs
VERSIONS=$(docker run -i $(docker build -q ${IMAGE_PATH}) /bin/sh -c "java -version 2>&1 && node --version")
echo "$VERSIONS"
# Check Java version
if [ "${{ matrix.java-version }}" = "8" ]; then
if ! echo "$VERSIONS" | grep -q "version \"1.8.0"; then
echo "::error::Expected Java 8 but got different version"
exit 1
fi
else
if ! echo "$VERSIONS" | grep -q "version \"${{ matrix.java-version }}"; then
echo "::error::Expected Java ${{ matrix.java-version }} but got different version"
exit 1
fi
fi
# Check Node version
if ! echo "$VERSIONS" | grep -q "v${{ matrix.node-version }}"; then
echo "::error::Expected Node.js ${{ matrix.node-version }} but got different version"
exit 1
fi
auto-merge:
runs-on: ubuntu-latest
needs: build
permissions:
pull-requests: write
contents: write
steps:
- name: Automatically merge dependabot upgrades
uses: fastify/[email protected]
with:
target: minor