From 282b5c7dedef4627ee5a5e7d1941ed6ecca321c5 Mon Sep 17 00:00:00 2001 From: xiabin Date: Tue, 11 Feb 2025 10:12:47 +0800 Subject: [PATCH] test --- .gitea/workflows/demo.yaml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 659f3df..e156876 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -6,14 +6,25 @@ jobs: Explore-Gitea-Actions: runs-on: runner 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 - uses: actions/checkout@v4 - - 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 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build Service run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + cd app/${{ matrix.service }} + go mod tidy + go build -o ${{ matrix.service }}_bin ./${{ matrix.service }} + + - name: Run Service + run: | + cd app/${{ matrix.service }} + ./${{ matrix.service }}_bin -f etc/${{ matrix.service }}.yaml & + background: true + + - name: Keep alive + run: sleep 300 \ No newline at end of file