Update .gitea/workflows/demo.yaml
This commit is contained in:
parent
4ad7abc25f
commit
1a176d09da
@ -1,19 +1,26 @@
|
|||||||
name: Gitea Actions Demo
|
name: Gitea Actions Demo
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
||||||
|
name: Java CI
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
build:
|
||||||
runs-on: node20
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
# 1. 检出代码
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
- name: Checkout code
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: http://172.23.112.123:3000/actions/checkout@main
|
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."
|
# 2. 设置 OpenJDK 17
|
||||||
- name: List files in the repository
|
- name: Set up JDK 17
|
||||||
run: |
|
uses: http://172.23.112.123:3000/actions/setup-java.git@main
|
||||||
ls ${{ gitea.workspace }}
|
with:
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
distribution: 'temurin' # 使用 Eclipse Temurin(OpenJDK 发行版)
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
|
# 3. 构建项目(假设使用 Maven)
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn -h
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user