-
Notifications
You must be signed in to change notification settings - Fork 11
44 lines (41 loc) · 1003 Bytes
/
api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: api
env:
# Common versions
GO_VERSION: '1.22'
TZ: Asia/Shanghai
on:
push:
branches:
- '*'
jobs:
buildapi:
name: "api"
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: install task
run: |
echo "install task"
go install github.com/go-task/task/v3/cmd/task@latest
- name: build api
run: |
task swag
- name: Build and push docs api
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: ttl.sh/easysoft/zentaoapi
context: docs