Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .ci/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

# Install common tools and dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
unzip \
zip \
git \
python3 \
xvfb \
ant \
maven \
libncurses6 \
sudo \
openjdk-17-jdk \
openjdk-21-jdk \
&& rm -rf /var/lib/apt/lists/*

# Install Java 8 (Zulu FX)
RUN mkdir -p /usr/lib/jvm
# Using a specific version of Zulu 8 with FX
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 \
&& tar -xzf /tmp/java8.tar.gz -C /usr/lib/jvm \
&& mv /usr/lib/jvm/zulu8.82.0.21-ca-fx-jdk8.0.432-linux_x64 /usr/lib/jvm/java-8-zulu-fx \
&& rm /tmp/java8.tar.gz

# Download cn1-binaries
# We download it to /opt/cn1-binaries so it can be reused
RUN wget -q https://github.com/codenameone/cn1-binaries/archive/refs/heads/master.zip -O /tmp/cn1-binaries.zip \
&& unzip -q /tmp/cn1-binaries.zip -d /opt \
&& mv /opt/cn1-binaries-master /opt/cn1-binaries \
&& rm /tmp/cn1-binaries.zip

# Set convenient env vars
ENV JAVA_HOME_8=/usr/lib/jvm/java-8-zulu-fx
ENV JAVA_HOME_17=/usr/lib/jvm/java-17-openjdk-amd64
ENV JAVA_HOME_21=/usr/lib/jvm/java-21-openjdk-amd64

ENV CN1_BINARIES=/opt/cn1-binaries
38 changes: 38 additions & 0 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Container

on:
push:
paths:
- '.ci/container/Dockerfile'
- '.github/workflows/build-container.yml'
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lowercase Repository Name
id: string
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .ci/container
push: true
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/pr-ci-container:latest
Loading