File tree Expand file tree Collapse file tree 3 files changed +361
-281
lines changed
Expand file tree Collapse file tree 3 files changed +361
-281
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:24.04
2+
3+ ENV DEBIAN_FRONTEND=noninteractive
4+
5+ # Install common tools and dependencies
6+ RUN apt-get update && apt-get install -y \
7+ curl \
8+ wget \
9+ unzip \
10+ zip \
11+ git \
12+ python3 \
13+ xvfb \
14+ ant \
15+ maven \
16+ libncurses6 \
17+ sudo \
18+ openjdk-17-jdk \
19+ openjdk-21-jdk \
20+ && rm -rf /var/lib/apt/lists/*
21+
22+ # Install Java 8 (Zulu FX)
23+ RUN mkdir -p /usr/lib/jvm
24+ # Using a specific version of Zulu 8 with FX
25+ RUN wget -q https://cdn.azul.com/zulu/bin/zulu8.82.0.21-ca-fx-jdk8.0.432-linux_x64.tar.gz -O /tmp/java8.tar.gz \
26+ && tar -xzf /tmp/java8.tar.gz -C /usr/lib/jvm \
27+ && mv /usr/lib/jvm/zulu8.82.0.21-ca-fx-jdk8.0.432-linux_x64 /usr/lib/jvm/java-8-zulu-fx \
28+ && rm /tmp/java8.tar.gz
29+
30+ # Download cn1-binaries
31+ # We download it to /opt/cn1-binaries so it can be reused
32+ RUN wget -q https://github.com/codenameone/cn1-binaries/archive/refs/heads/master.zip -O /tmp/cn1-binaries.zip \
33+ && unzip -q /tmp/cn1-binaries.zip -d /opt \
34+ && mv /opt/cn1-binaries-master /opt/cn1-binaries \
35+ && rm /tmp/cn1-binaries.zip
36+
37+ # Set convenient env vars
38+ ENV JAVA_HOME_8=/usr/lib/jvm/java-8-zulu-fx
39+ ENV JAVA_HOME_17=/usr/lib/jvm/java-17-openjdk-amd64
40+ ENV JAVA_HOME_21=/usr/lib/jvm/java-21-openjdk-amd64
41+
42+ ENV CN1_BINARIES=/opt/cn1-binaries
Original file line number Diff line number Diff line change 1+ name : Build Container
2+
3+ on :
4+ push :
5+ paths :
6+ - ' .ci/container/Dockerfile'
7+ - ' .github/workflows/build-container.yml'
8+ workflow_dispatch :
9+
10+ jobs :
11+ build-and-push :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ packages : write
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v3
19+
20+ - name : Log in to the Container registry
21+ uses : docker/login-action@v2
22+ with :
23+ registry : ghcr.io
24+ username : ${{ github.actor }}
25+ password : ${{ secrets.GITHUB_TOKEN }}
26+
27+ - name : Lowercase Repository Name
28+ id : string
29+ uses : ASzc/change-string-case-action@v5
30+ with :
31+ string : ${{ github.repository }}
32+
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@v4
35+ with :
36+ context : .ci/container
37+ push : true
38+ tags : ghcr.io/${{ steps.string.outputs.lowercase }}/pr-ci-container:latest
You can’t perform that action at this time.
0 commit comments