From 6af2ef27058153c854f0c23c19f21f23fe6704bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:40:38 +0000 Subject: [PATCH 1/6] Initial plan From 653f106417bea151be0b3cad736149aa9d4a5c21 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:44:39 +0000 Subject: [PATCH 2/6] Add Copilot Java 25 workflow and devcontainer configuration Co-authored-by: teggr <837787+teggr@users.noreply.github.com> --- .devcontainer/devcontainer.json | 30 +++++++++++++ .github/workflows/copilot-java-setup.yml | 54 ++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/copilot-java-setup.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3c4c537 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,30 @@ +{ + "name": "Awesome Java UI - Java 25", + "image": "mcr.microsoft.com/devcontainers/java:25", + "features": { + "ghcr.io/devcontainers/features/java:1": { + "version": "25", + "installMaven": "false", + "installGradle": "false" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "vscjava.vscode-java-pack", + "GitHub.copilot", + "GitHub.copilot-chat" + ], + "settings": { + "java.configuration.runtimes": [ + { + "name": "JavaSE-25", + "path": "/usr/local/sdkman/candidates/java/current" + } + ] + } + } + }, + "postCreateCommand": "curl -Ls https://sh.jbang.dev | bash -s - app setup", + "remoteUser": "vscode" +} diff --git a/.github/workflows/copilot-java-setup.yml b/.github/workflows/copilot-java-setup.yml new file mode 100644 index 0000000..6152e28 --- /dev/null +++ b/.github/workflows/copilot-java-setup.yml @@ -0,0 +1,54 @@ +name: Copilot Java 25 Workflow + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + setup-java-25: + name: Setup Java 25 Environment + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Java 25 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '25' + + - name: Setup JBang + uses: jbangdev/setup-jbang@main + + - name: Cache JBang dependencies + uses: actions/cache@v4 + with: + path: | + ~/.jbang + key: ${{ runner.os }}-jbang-${{ hashFiles('**/*.java') }} + restore-keys: | + ${{ runner.os }}-jbang- + + - name: Verify Java installation + run: | + java -version + echo "JAVA_HOME=$JAVA_HOME" + + - name: Verify JBang installation + run: | + jbang version + + - name: Test build with Java 25 + run: | + jbang run build.java + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: site-build + path: _site/ From 14e4493dbcb9da59d5b6fb1686db33efd9ba8e4e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:45:43 +0000 Subject: [PATCH 3/6] Add documentation for Copilot Java 25 workflow and devcontainer Co-authored-by: teggr <837787+teggr@users.noreply.github.com> --- .github/copilot-instructions.md | 14 ++++++++++++++ README.md | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a622c5d..7b11813 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -71,6 +71,20 @@ The front matter schema: - Automatically builds and deploys to GitHub Pages on push to main - Uses JBang to run the build script in the CI environment +### Copilot Java 25 Workflow +- GitHub Actions workflow in `.github/workflows/copilot-java-setup.yml` +- Ensures Java 25 environment for Copilot agents on pull requests +- Includes JBang setup with caching for improved performance +- Validates the build process with Java 25 +- Can be manually triggered via workflow_dispatch + +### Development Environment +- DevContainer configuration in `.devcontainer/devcontainer.json` +- Pre-configured with Java 25 for GitHub Codespaces and VS Code +- Includes GitHub Copilot extensions and Java development tools +- Automatically sets up JBang on container creation +- Provides consistent development environment across all contributors + ### Local Development - Output directory (`_site/`) is gitignored - Rebuild the site locally after markdown changes to preview diff --git a/README.md b/README.md index bbd5a57..d8d58c0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,15 @@ Visit [https://awesome-java-ui.com](https://awesome-java-ui.com) ## Quick Start +### Option 1: GitHub Codespaces or VS Code DevContainer +The easiest way to get started is with our pre-configured development environment: + +1. Open this repository in GitHub Codespaces or VS Code with DevContainers +2. The environment will automatically set up Java 25 and JBang +3. Run `jbang run build.java` to build the site +4. Open `_site/index.html` in a browser to view the site + +### Option 2: Local Development **Prerequisites:** - Java 25+ - JBang From 3666158eb795e8ae9a50e559563ead50ff7dd2a9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:46:41 +0000 Subject: [PATCH 4/6] Address code review: pin action versions and secure JBang install Co-authored-by: teggr <837787+teggr@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 +- .github/workflows/build-site.yml | 2 +- .github/workflows/copilot-java-setup.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3c4c537..4d866a3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -25,6 +25,6 @@ } } }, - "postCreateCommand": "curl -Ls https://sh.jbang.dev | bash -s - app setup", + "postCreateCommand": "bash -c 'cd /tmp && curl -Ls https://sh.jbang.dev -o jbang-install.sh && bash jbang-install.sh app setup && rm jbang-install.sh'", "remoteUser": "vscode" } diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index a754082..7efbf15 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -38,7 +38,7 @@ jobs: java-version: '25' - name: Setup JBang - uses: jbangdev/setup-jbang@main + uses: jbangdev/setup-jbang@v0.1.1 - name: Build site with JBang # this outputs to the /docs folder diff --git a/.github/workflows/copilot-java-setup.yml b/.github/workflows/copilot-java-setup.yml index 6152e28..5b398ee 100644 --- a/.github/workflows/copilot-java-setup.yml +++ b/.github/workflows/copilot-java-setup.yml @@ -23,7 +23,7 @@ jobs: java-version: '25' - name: Setup JBang - uses: jbangdev/setup-jbang@main + uses: jbangdev/setup-jbang@v0.1.1 - name: Cache JBang dependencies uses: actions/cache@v4 From acb103be2ae50f2bc3c424f6aac750f20e572c4c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:47:22 +0000 Subject: [PATCH 5/6] Add explicit permissions to workflow for security Co-authored-by: teggr <837787+teggr@users.noreply.github.com> --- .github/workflows/copilot-java-setup.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/copilot-java-setup.yml b/.github/workflows/copilot-java-setup.yml index 5b398ee..74604a4 100644 --- a/.github/workflows/copilot-java-setup.yml +++ b/.github/workflows/copilot-java-setup.yml @@ -5,6 +5,10 @@ on: pull_request: types: [opened, synchronize, reopened] +permissions: + contents: read + actions: read + jobs: setup-java-25: name: Setup Java 25 Environment From 14dc69bdc32b012a337df422b0f800a615434cc8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 21:39:46 +0000 Subject: [PATCH 6/6] Rename workflow to copilot-setup-steps.yml and adapt to template Co-authored-by: teggr <837787+teggr@users.noreply.github.com> --- .github/copilot-instructions.md | 2 +- .github/workflows/copilot-java-setup.yml | 58 ----------------------- .github/workflows/copilot-setup-steps.yml | 46 ++++++++++++++++++ 3 files changed, 47 insertions(+), 59 deletions(-) delete mode 100644 .github/workflows/copilot-java-setup.yml create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 7b11813..f459c0d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -72,7 +72,7 @@ The front matter schema: - Uses JBang to run the build script in the CI environment ### Copilot Java 25 Workflow -- GitHub Actions workflow in `.github/workflows/copilot-java-setup.yml` +- GitHub Actions workflow in `.github/workflows/copilot-setup-steps.yml` - Ensures Java 25 environment for Copilot agents on pull requests - Includes JBang setup with caching for improved performance - Validates the build process with Java 25 diff --git a/.github/workflows/copilot-java-setup.yml b/.github/workflows/copilot-java-setup.yml deleted file mode 100644 index 74604a4..0000000 --- a/.github/workflows/copilot-java-setup.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Copilot Java 25 Workflow - -on: - workflow_dispatch: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: read - actions: read - -jobs: - setup-java-25: - name: Setup Java 25 Environment - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Java 25 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '25' - - - name: Setup JBang - uses: jbangdev/setup-jbang@v0.1.1 - - - name: Cache JBang dependencies - uses: actions/cache@v4 - with: - path: | - ~/.jbang - key: ${{ runner.os }}-jbang-${{ hashFiles('**/*.java') }} - restore-keys: | - ${{ runner.os }}-jbang- - - - name: Verify Java installation - run: | - java -version - echo "JAVA_HOME=$JAVA_HOME" - - - name: Verify JBang installation - run: | - jbang version - - - name: Test build with Java 25 - run: | - jbang run build.java - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: site-build - path: _site/ diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..c485dc5 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,46 @@ +name: "Copilot Setup Steps" + +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + # This job name MUST be exactly "copilot-setup-steps" + copilot-setup-steps: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + java-version: '25' + distribution: 'temurin' + + - name: Setup JBang + uses: jbangdev/setup-jbang@v0.1.1 + + - name: Verify Java version + run: java -version + + - name: Cache JBang dependencies + uses: actions/cache@v4 + with: + path: | + ~/.jbang + key: ${{ runner.os }}-jbang-${{ hashFiles('**/*.java') }} + restore-keys: | + ${{ runner.os }}-jbang- + + - name: Download dependencies + run: jbang run --fresh build.java