From 6ec2a92b8ea00a36728df44c632a5c81b3bc80ac Mon Sep 17 00:00:00 2001 From: hsc Date: Sun, 30 Mar 2025 17:50:42 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=96=B0=E5=A2=9E=E6=89=A7=E8=A1=8C=20he?= =?UTF-8?q?llo.sh=E8=84=9A=E6=9C=AC=E7=9A=84=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 .drone.yml 文件中添加了新的步骤 run-hello-script - 新增 hello.sh 脚本,输出 "hello world" - 添加脚本执行权限并执行 --- .drone.yml | 8 ++++---- hello.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 hello.sh diff --git a/.drone.yml b/.drone.yml index 6a4b927..10e16a3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,8 +3,8 @@ type: docker name: default steps: - - name: build - image: docker.1ms.run/golang:1.20 + # 新增执行shell脚本的步骤 + - name: run-hello-script commands: - - go build - - go test \ No newline at end of file + - chmod +x hello.sh # 添加执行权限 + - ./hello.sh # 执行脚本 \ No newline at end of file diff --git a/hello.sh b/hello.sh new file mode 100644 index 0000000..3f638d0 --- /dev/null +++ b/hello.sh @@ -0,0 +1 @@ +echo 'hello world' \ No newline at end of file