Skip to content
Merged
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
35 changes: 35 additions & 0 deletions prepare-for-a-maven-lifecycle/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Prepare for running a Maven lifecycle"
description: "Prepares to run a Maven lifecycle by cloning the repo and its dependencies and installing OpenJDK and Maven"

inputs:
token:
default: ${{ github.token }}
description: "A GitHub token to use for cloning repositories"
project-deps:
required: false
description: "Path to a file with project dependencies to clone. If not provided, the action will only clone the current repository."

runs:
using: "composite"
steps:
- name: Set repository path variable
run: echo "CHECKOUT_PATH=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
shell: bash

- uses: actions/checkout@v4
with:
path: ${{ env.CHECKOUT_PATH || '.' }}

- uses: dbeaver/github-actions/clone-repositories@devel
if: ${{ inputs.project-deps != null }}
with:
project_deps_path: ${{ inputs.project-deps }}
token: ${{ inputs.token }}

- uses: dbeaver/github-actions/install-maven@devel

- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: maven