Explorar o código

更新 GitHub Actions 权限配置

修改了 `.github/workflows/go-tag-release.yml` 文件,为工作流增加了默认的 `contents: read` 权限,并细化了标签发布时的权限设置,使其仅对内容具有写权限。
SongZihuan hai 1 semana
pai
achega
e31ad65734
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      .github/workflows/go-tag-release.yml

+ 4 - 1
.github/workflows/go-tag-release.yml

@@ -1,4 +1,6 @@
 name: Check And Publish Golang Project
 name: Check And Publish Golang Project
+permissions:
+  contents: read
 
 
 on:
 on:
   push:
   push:
@@ -170,7 +172,8 @@ jobs:
       - build-ubuntu
       - build-ubuntu
       - build-windows
       - build-windows
     if: startsWith(github.ref, 'refs/tags/')
     if: startsWith(github.ref, 'refs/tags/')
-    permissions: write-all
+    permissions:
+      contents: write
 
 
     steps:
     steps:
       - name: Checkout code
       - name: Checkout code