fix: change GID/UID to 10101 #339
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: "Chiselled Ubuntu 'jre' Tests" | |
on: | |
pull_request: | |
push: | |
env: | |
image-name: ubuntu/jre:test | |
build-image-name: temurin-jdk8-builder:test | |
maven-image-name: temurin-jdk8-maven:test | |
maven-image-base: maven:3.9.0-eclipse-temurin-8 | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
name: Build and Test | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu-release: ["22.04"] | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '8' | |
- name: Tests Maven cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ runner.temp }}/.m2 | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Tests PDFBox | |
uses: actions/cache@v4 | |
with: | |
path: tests/pdfbox/pdfbox | |
key: tests-pdfbox-test-pdbbox | |
restore-keys: | | |
tests-pdfbox-test-pdbbox | |
- name: Tests Petclinic | |
uses: actions/cache@v4 | |
with: | |
path: tests/petclinic-test/spring-petclinic | |
key: tests-petclinic-test-spring-petclinic | |
restore-keys: | | |
tests-petclinic-test-spring-petclinic | |
- name: Build the jre image | |
run: | | |
docker build \ | |
-t ${{ env.image-name }} \ | |
--build-arg UID=$(id -u ${USER}) \ | |
--build-arg GID=$(id -g ${USER}) \ | |
-f jre/Dockerfile.${{ matrix.ubuntu-release }} \ | |
jre | |
- name: Build the JDK docker image | |
run: | | |
docker build \ | |
-t ${{ env.build-image-name }} \ | |
--build-arg UID=$(id -u ${USER}) \ | |
--build-arg GID=$(id -g ${USER}) \ | |
-f tests/containers/builder/Dockerfile.${{ matrix.ubuntu-release }} \ | |
tests/containers/builder | |
- name: Build Maven docker image | |
run: | | |
docker build \ | |
-t ${{ env.maven-image-name }} \ | |
--build-arg UID=$(id -u ${USER}) \ | |
--build-arg GID=$(id -g ${USER}) \ | |
--build-arg BASE_IMAGE=${{ env.image-name }} \ | |
--build-arg MAVEN_IMAGE=${{ env.maven-image-base }} \ | |
-f tests/containers/maven/Dockerfile.${{ matrix.ubuntu-release }} \ | |
tests/containers/maven | |
- name: Run Tests | |
working-directory: ${{ github.workspace }}/tests/ | |
run: | | |
./run-all-tests ${{ env.image-name }} \ | |
${{ env.build-image-name }} \ | |
${{ runner.temp }}/.m2 \ | |
${{ env.maven-image-name }} | |
multi-arch-build: | |
runs-on: ubuntu-22.04 | |
name: Multi Architecture Build | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu-release: ["22.04"] | |
arch: ["amd64", "arm64"] | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# Lint the Dockerfiles | |
- name: Lint the Dockerfile | |
uses: hadolint/[email protected] | |
with: | |
dockerfile: jre/Dockerfile.${{ matrix.ubuntu-release }} | |
ignore: DL3008,DL3015,SC3028 | |
- name: Build the jre image | |
run: | | |
docker buildx build \ | |
--tag=${{ env.image-name }} \ | |
--file=jre/Dockerfile.${{ matrix.ubuntu-release }} \ | |
--platform=linux/${{ matrix.arch }} \ | |
jre |