Files
apache--hertzbeat/script/ci/github-actions/setup-deps/action.yml
T
wehub-resource-sync c8cebdfeee
MCP Bash Server CI / Test MCP Bash Server (dev) (push) Waiting to run
MCP Bash Server CI / Test MCP Bash Server (release) (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:11:39 +08:00

66 lines
2.1 KiB
YAML

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: setup-deps
description: Install host system dependencies (with mvnd)
runs:
using: composite
steps:
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 25
cache: maven
- name: Validate mvnd runner support
shell: bash
run: |
if [ "${RUNNER_OS}" != "Linux" ] || [ "${RUNNER_ARCH}" != "X64" ]; then
echo "setup-deps currently supports mvnd only on Linux/X64 runners; got ${RUNNER_OS}/${RUNNER_ARCH}" >&2
exit 1
fi
- name: Cache mvnd
id: mvnd-cache
uses: actions/cache@v4
with:
path: ~/.local/mvnd
key: mvnd-2.0.0-rc-3-linux-amd64
- name: Install mvnd
if: steps.mvnd-cache.outputs.cache-hit != 'true'
shell: bash
run: |
MVND_VERSION=2.0.0-rc-3
MVND_PLATFORM=linux-amd64
curl -sL https://dlcdn.apache.org/maven/mvnd/${MVND_VERSION}/maven-mvnd-${MVND_VERSION}-${MVND_PLATFORM}.zip -o mvnd.zip
unzip -q mvnd.zip
mkdir -p $HOME/.local
mv maven-mvnd-${MVND_VERSION}-${MVND_PLATFORM} $HOME/.local/mvnd
- name: Export mvnd environment
shell: bash
run: |
echo "$HOME/.local/mvnd/bin" >> $GITHUB_PATH
echo "MVND_HOME=$HOME/.local/mvnd" >> $GITHUB_ENV
- name: Verify mvnd installation
shell: bash
run: mvnd --version