action-demo/.gitea/workflows/test-java.yml

37 lines
730 B
YAML
Raw Normal View History

2024-11-17 19:16:32 +08:00
name: Test Java
on:
push:
2024-11-18 11:32:17 +08:00
2024-11-17 19:15:11 +08:00
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
2024-11-18 13:41:37 +08:00
- name: Cache Tool cache
2024-11-18 11:48:28 +08:00
uses: actions/cache@v3
with:
path: ${{ env.RUNNER_TOOL_CACHE }}
key: ${{ runner.os }}-${{ env.RUNNER_TOOL_CACHE }}
2024-11-18 11:40:17 +08:00
- name: Run
run: |
echo ${{ env.RUNNER_TOOL_CACHE }}
2024-11-18 11:41:37 +08:00
ls /
2024-11-18 11:40:17 +08:00
2024-11-17 19:15:11 +08:00
- name: Setup Java
2024-11-17 19:36:46 +08:00
uses: actions/setup-java@v4
2024-11-17 19:15:11 +08:00
with:
distribution: zulu
java-version: 17
cache: gradle
2024-11-17 19:16:32 +08:00
- name: Run
2024-11-17 19:15:11 +08:00
run: |
2024-11-18 13:51:55 +08:00
java --version
chmod a+x ./gradlew
./gradlew help