From 483efdabc5875545391f88c5fa7a71ff02800d58 Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Wed, 11 Jan 2023 17:22:11 +0800 Subject: [PATCH] [workflow] fixed the on-merge condition check (#2452) --- .github/workflows/draft_github_release_post.yml | 3 +-- .github/workflows/release_docker.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/draft_github_release_post.yml b/.github/workflows/draft_github_release_post.yml index 413714daf..53bfa9e8d 100644 --- a/.github/workflows/draft_github_release_post.yml +++ b/.github/workflows/draft_github_release_post.yml @@ -8,11 +8,10 @@ on: types: - closed - jobs: release: name: Draft Release Post - if: github.repository == 'hpcaitech/ColossalAI' + if: ( github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true ) && github.repository == 'hpcaitech/ColossalAI' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index c72d3fb33..8da6e5f87 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -2,13 +2,16 @@ name: Publish Docker Image to DockerHub on: workflow_dispatch: - release: - types: [published] + pull_request: + paths: + - 'version.txt' + types: + - closed jobs: release: name: Publish Docker Image to DockerHub - if: github.repository == 'hpcaitech/ColossalAI' + if: ( github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true ) && github.repository == 'hpcaitech/ColossalAI' runs-on: [self-hosted, gpu] container: image: "hpcaitech/docker-in-docker:latest"