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

Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
LoGin 2025-05-07 13:20:06 +08:00 committed by GitHub
parent 4cc267146a
commit 37aa18e09f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

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

View File

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