Compare commits

...

13 Commits
v-test ... main

Author SHA1 Message Date
root 8b37ac5ceb info
Docker Deploy / build-and-deploy (push) Successful in 2m15s Details
2024-07-13 19:32:44 +08:00
root 4650d3b5f7 test
Docker Deploy / build-and-deploy (push) Successful in 1m36s Details
2024-07-13 19:23:38 +08:00
root 789b558548 更新 .drone.yml
Docker Deploy / build-and-deploy (push) Has been cancelled Details
2024-07-13 19:22:49 +08:00
root 0dda7ec192 更新 .drone.yml
Docker Deploy / build-and-deploy (push) Has been cancelled Details
2024-07-13 19:22:33 +08:00
root fdb45446a9 更新 .drone.yml
Docker Deploy / build-and-deploy (push) Successful in 1m52s Details
2024-07-13 16:39:01 +08:00
root 2ec95b8ce9 添加 .drone.yml
Docker Deploy / build-and-deploy (push) Successful in 3m2s Details
2024-07-13 16:13:21 +08:00
root 8970145d5b 更新 main.go
Docker Deploy / build-and-deploy (push) Successful in 2m18s Details
2024-07-07 20:58:49 +08:00
root 5290326d30 环境变量var改为密钥secrets
Docker Deploy / build-and-deploy (push) Successful in 1m49s Details
2024-07-07 20:48:38 +08:00
root 36f72006c7 更新 .gitea/workflows/main.yaml
Docker Deploy / build-and-deploy (push) Failing after 11s Details
2024-07-07 20:44:08 +08:00
root d9be8d5923 更新 .gitea/workflows/main.yaml
Docker Deploy / build-and-deploy (push) Successful in 1m54s Details
2024-07-07 10:01:19 +08:00
root 8abd23b093 Merge pull request '更新 .gitea/workflows/main.yaml' (#2) from test into main
Docker Deploy / build-and-deploy (push) Successful in 1m52s Details
Reviewed-on: #2
2024-07-07 09:48:13 +08:00
root 70dda07f28 更新 .gitea/workflows/main.yaml
Docker Deploy / build-and-deploy (push) Successful in 1m49s Details
2024-07-07 09:42:21 +08:00
root e21a616ecd Merge pull request '更新 .gitea/workflows/main.yaml' (#1) from v-test into main
Docker Deploy / build-and-deploy (push) Successful in 1m53s Details
Reviewed-on: #1
2024-07-07 08:31:56 +08:00
3 changed files with 19 additions and 7 deletions

9
.drone.yml Normal file
View File

@ -0,0 +1,9 @@
kind: pipeline
type: docker
name: greeting
steps:
- name: test
image: alpine
commands:
- echo hello world!!

View File

@ -1,10 +1,13 @@
name: Docker Deploy
on:
workflow_dispatch:
push:
branches:
- main # 监听main分支的push事件
- v*
- v* # 监听v开头的分支push事件
tags:
- 'v*' #监听所有含v开头的push事件
jobs:
build-and-deploy:
@ -39,8 +42,8 @@ jobs:
uses: http://${{vars.DOMAIN}}:5678/docker/login-action@v3
with:
registry: ${{ vars.ALI_REGISTRY }}
username: ${{ vars.ALI_USER }}
password: ${{ vars.ALI_PWD }}
username: ${{ secrets.ALI_USER }}
password: ${{ secrets.ALI_PWD }}
- name: Remove Container & Image
run: |
@ -57,8 +60,8 @@ jobs:
dockerfile: Dockerfile
#tags: ${{ vars.ALI_REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
tags: ${{env.REMOTE_IMG_NAME}} #支持env变量
username: ${{ vars.ALI_USER }}
password: ${{ vars.ALI_PWD }}
username: ${{ secrets.ALI_USER }}
password: ${{ secrets.ALI_PWD }}
- name: Run On Server
run: |
docker run -d --name $CTN_NAME -p $HOST_PORT:8080 $REMOTE_IMG_NAME

View File

@ -13,11 +13,11 @@ import (
func main() {
router := gin.Default()
router.GET("/", func(c *gin.Context) {
Q := c.Query("Q")
Q := c.Query("q")
c.JSON(200, gin.H{
"message": "Hello "+Q,
})
fmt.Println("Hello "+Q)
fmt.Println("Hello "+Q+"……")
})
router.Run(":8080")
}