[workflow] fixed the on-merge condition check (#2452)

pull/2456/head
Frank Lee 2023-01-11 17:22:11 +08:00 committed by GitHub
parent cfd1d5ee49
commit 483efdabc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -8,11 +8,10 @@ on:
types: types:
- closed - closed
jobs: jobs:
release: release:
name: Draft Release Post 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 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -2,13 +2,16 @@ name: Publish Docker Image to DockerHub
on: on:
workflow_dispatch: workflow_dispatch:
release: pull_request:
types: [published] paths:
- 'version.txt'
types:
- closed
jobs: jobs:
release: release:
name: Publish Docker Image to DockerHub 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] runs-on: [self-hosted, gpu]
container: container:
image: "hpcaitech/docker-in-docker:latest" image: "hpcaitech/docker-in-docker:latest"