From 1712850056d26dace8e01ff193db978eb05157bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E4=BF=8A=E6=88=90?= Date: Thu, 21 Sep 2023 17:41:54 +0800 Subject: [PATCH] ci/cd --- .gitea/workflows/build.yaml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2f32355..e45d43d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,19 +1,22 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions +name: Build and Deploy Golang Service + on: [push] jobs: - Explore-Gitea-Actions: + build: + name: Build Golang Service runs-on: ubuntu-latest + 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@v3 - - 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@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 2.10 # ๅฏไปฅๆ นๆฎๆ‚จ็š„้กน็›ฎ่ฆๆฑ‚ๆ›ดๆ”นGo็š„็‰ˆๆœฌ + + - name: Build run: | - ls ${{ gitea.workspace }} - - run: echo "๐Ÿ This job's status is ${{ job.status }}." \ No newline at end of file + go mod download + go build -o dev-go-admin .