Unverified Commit 7d15ec7f authored by BoxiangW's avatar BoxiangW Committed by GitHub
Browse files

Update github actions (#205)

parent 5420809f
...@@ -3,6 +3,15 @@ name: Pull Request CI and Build ...@@ -3,6 +3,15 @@ name: Pull Request CI and Build
on: pull_request on: pull_request
jobs: jobs:
cancel_previous_workflow:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
assign_reviewer: assign_reviewer:
name: Assign Reviewer for PR name: Assign Reviewer for PR
runs-on: ubuntu-latest runs-on: ubuntu-latest
...@@ -15,7 +24,7 @@ jobs: ...@@ -15,7 +24,7 @@ jobs:
build: build:
name: Build and Test Colossal-AI name: Build and Test Colossal-AI
if: ${{ always() }} && github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' if: ${{ always() }} && github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
needs: [assign_reviewer] needs: [cancel_previous_workflow, assign_reviewer]
runs-on: [self-hosted, gpu] runs-on: [self-hosted, gpu]
container: container:
image: nvcr.io/nvidia/pytorch:21.07-py3 image: nvcr.io/nvidia/pytorch:21.07-py3
...@@ -43,8 +52,8 @@ jobs: ...@@ -43,8 +52,8 @@ jobs:
format_check: format_check:
name: Format Check name: Format Check
if: ${{ always() }} && github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' if: github.event.pull_request.draft == false && github.base_ref == 'main' && github.head_ref == 'develop' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
needs: [assign_reviewer, build] needs: [build]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
......
...@@ -5,6 +5,7 @@ on: ...@@ -5,6 +5,7 @@ on:
jobs: jobs:
close-issues: close-issues:
if: github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment