Browse Source

ci: 限制Docker镜像推送和CNB.cool同步任务仅在主仓库执行 (#1150)

Signed-off-by: longjin <longjin@DragonOS.org>
LoGin 1 day ago
parent
commit
37aa18e09f

+ 1 - 1
.github/workflows/publish-dragonos-docker-image.yml

@@ -35,5 +35,5 @@ jobs:
           context: "{{defaultContext}}:tools"
           file: Dockerfile
           platforms: linux/amd64
-          push: true
+          push: ${{ github.repository == 'DragonOS-Community/DragonOS' }}
           tags: dragonos/dragonos-dev:${{ steps.fetch-versions.outputs.build_container_version }}

+ 1 - 0
.github/workflows/sync-to-cnb.yml

@@ -3,6 +3,7 @@ on: [push]
 
 jobs:
   sync:
+    if: github.repository == 'DragonOS-Community/DragonOS'
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v3