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
50 changes: 50 additions & 0 deletions .github/workflows/job.build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Build"

"on":
workflow_call:
inputs:
runner:
description: "Runner"
required: false
type: string
default: "ubuntu-latest"
workflow_dispatch:
inputs:
runner:
description: "Runner"
required: false
type: string
default: "ubuntu-latest"

permissions:
contents: "read"

jobs:
build:
name: "Maven Plugin"
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
Copy link

Copilot AI Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since runner has a default value in the workflow_call inputs, you can simplify this to runs-on: ${{ inputs.runner }} without the fallback.

Suggested change
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
runs-on: ${{ inputs.runner }}

Copilot uses AI. Check for mistakes.
permissions:
contents: "read"
steps:
- name: "Setup: Harden Runner"
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
disable-sudo: true
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
persist-credentials: false
- name: "Setup: JDK"
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: graalvm
java-version: "24"
- name: "Setup: Elide"
uses: elide-dev/setup-elide@990b915b2974a70e7654acb1303607b4cd1d3538 # v2.0.0
- name: "Build: Plugin"
run: ./gradlew build publishToMavenLocal
- name: "Test: Plugin"
working-directory: sample
run: ./mvnw clean package
17 changes: 17 additions & 0 deletions .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "PR"

"on":
pull_request: {}

permissions:
contents: "read"

jobs:
build:
name: "Build"
uses: ./.github/workflows/job.build.yml
secrets: inherit
permissions:
contents: "read"
with:
runner: "ubuntu-latest"
19 changes: 19 additions & 0 deletions .github/workflows/on.push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "CI"

"on":
push:
branches:
- main

permissions:
contents: "read"

jobs:
build:
name: "Build"
uses: ./.github/workflows/job.build.yml
secrets: inherit
permissions:
contents: "read"
with:
runner: "ubuntu-latest"
Comment on lines +1 to +19
Copy link

Copilot AI Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove unnecessary double quotes around static values (e.g., name: CI) and keys to improve YAML readability and consistency.

Suggested change
name: "CI"
"on":
push:
branches:
- main
permissions:
contents: "read"
jobs:
build:
name: "Build"
uses: ./.github/workflows/job.build.yml
secrets: inherit
permissions:
contents: "read"
with:
runner: "ubuntu-latest"
name: CI
on:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
name: Build
uses: ./.github/workflows/job.build.yml
secrets: inherit
permissions:
contents: read
with:
runner: ubuntu-latest

Copilot uses AI. Check for mistakes.