Update .gitea/workflows/demo.yaml

This commit is contained in:
admin 2025-03-22 12:29:23 +08:00
parent 4ad7abc25f
commit 1a176d09da

View File

@ -1,19 +1,26 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
name: Java CI
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: node20
build:
runs-on: ubuntu-22.04
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
# 1. 检出代码
- name: Checkout code
uses: http://172.23.112.123:3000/actions/checkout@main
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
# 2. 设置 OpenJDK 17
- name: Set up JDK 17
uses: http://172.23.112.123:3000/actions/setup-java.git@main
with:
distribution: 'temurin' # 使用 Eclipse TemurinOpenJDK 发行版)
java-version: '17'
# 3. 构建项目(假设使用 Maven
- name: Build with Maven
run: mvn -h