ci: add ci

This commit is contained in:
Vincent Young 2023-11-19 19:26:07 -05:00
parent cd4848e739
commit ddd4de353d
No known key found for this signature in database
GPG Key ID: 84A0830C90354A56
5 changed files with 29 additions and 6 deletions

24
.github/workflows/ci.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
on:
push:
pull_request:
name: CI
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Build
run: go build ./...
- name: Test
run: go test ./...

View File

@ -8,7 +8,6 @@ on:
- 'v*'
env:
# github.repository as <account>/<repo>
DOCKER_IMAGE_NAME: missuo/deeplx
GHCR_IMAGE_NAME: ${{ github.repository }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}

View File

@ -4,7 +4,7 @@ on:
- 'v*'
pull_request:
name: Build Release
name: Release
jobs:
Build:

View File

@ -2,7 +2,7 @@
* @Author: Vincent Young
* @Date: 2022-10-18 07:32:29
* @LastEditors: Vincent Young
* @LastEditTime: 2023-10-28 22:45:58
* @LastEditTime: 2023-11-19 19:21:24
* @FilePath: /DeepLX/README.md
* @Telegram: https://t.me/missuo
*
@ -17,7 +17,7 @@
[![Docker Pulls][6]](https://hub.docker.com/r/missuo/deeplx)
[![Releases][7]](https://github.com/OwO-Network/DeepLX/releases)
[1]: https://img.shields.io/github/actions/workflow/status/OwO-Network/DeepLX/build.yml?logo=github
[1]: https://img.shields.io/github/actions/workflow/status/OwO-Network/DeepLX/release.yaml?logo=github
[2]: https://img.shields.io/github/go-mod/go-version/OwO-Network/DeepLX?logo=go
[3]: https://goreportcard.com/badge/github.com/OwO-Network/DeepLX
[4]: https://api.codeclimate.com/v1/badges/b5b30239174fc6603aca/maintainability

View File

@ -2,7 +2,7 @@
* @Author: Vincent Young
* @Date: 2023-07-01 21:45:34
* @LastEditors: Vincent Young
* @LastEditTime: 2023-10-28 22:42:08
* @LastEditTime: 2023-11-18 04:12:49
* @FilePath: /DeepLX/main.go
* @Telegram: https://t.me/missuo
*
@ -158,7 +158,7 @@ func main() {
r.GET("/", func(c *gin.Context) {
c.JSON(200, gin.H{
"code": 200,
"message": "DeepL Free API, Developed by sjlleo <i@leo.moe> and missuo <me@missuo.me>. Go to /translate with POST. http://github.com/OwO-Network/DeepLX",
"message": "DeepL Free API, Developed by sjlleo and missuo. Go to /translate with POST. http://github.com/OwO-Network/DeepLX",
})
})