From d0c7b336afa0f300ab0aeead186c9d588d42aac4 Mon Sep 17 00:00:00 2001 From: Pramod Mali Date: Mon, 27 Jul 2020 17:06:17 +0530 Subject: [PATCH 1/3] Update to run auto assign on PR only --- .github/workflows/auto_assign.yml | 2 +- .github/workflows/main.yml | 6 ------ .github/workflows/pr_assign.yml | 14 ++++++++++++++ .gitignore | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/pr_assign.yml diff --git a/.github/workflows/auto_assign.yml b/.github/workflows/auto_assign.yml index d36c370..6afa58d 100644 --- a/.github/workflows/auto_assign.yml +++ b/.github/workflows/auto_assign.yml @@ -10,4 +10,4 @@ reviewers: # A number of reviewers added to the pull request # Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 0 \ No newline at end of file +numberOfReviewers: 1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdd2186..1a22a26 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,12 +8,6 @@ on: - master jobs: - auto_assign: - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/auto-assign-action@v1.1.1 - with: - configuration-path: ".github/workflows/auto_assign.yml" build: name: Build runs-on: ubuntu-latest diff --git a/.github/workflows/pr_assign.yml b/.github/workflows/pr_assign.yml new file mode 100644 index 0000000..a4f3931 --- /dev/null +++ b/.github/workflows/pr_assign.yml @@ -0,0 +1,14 @@ +name: Firebase Deploy +on: + pull_request: + branches: + - master + +jobs: + auto_assign: + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v1.1.1 + with: + configuration-path: ".github/workflows/auto_assign.yml" + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4f8c969..68f9d04 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ yarn-debug.log* yarn-error.log* .firebase +settings.json From 439b035d818875ba3aa397c4631b4510642573c1 Mon Sep 17 00:00:00 2001 From: Pramod Mali Date: Mon, 27 Jul 2020 17:15:34 +0530 Subject: [PATCH 2/3] Seperate yaml files on Build-Deploy and PR --- .github/workflows/main.yml | 5 +--- .github/workflows/pr-pull-request.yml | 33 +++++++++++++++++++++++++++ .github/workflows/pr_assign.yml | 14 ------------ 3 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/pr-pull-request.yml delete mode 100644 .github/workflows/pr_assign.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a22a26..dbedd8a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,8 @@ -name: Firebase Deploy +name: Build and Deploy on: push: branches: - master - pull_request: - branches: - - master jobs: build: diff --git a/.github/workflows/pr-pull-request.yml b/.github/workflows/pr-pull-request.yml new file mode 100644 index 0000000..70b1fdc --- /dev/null +++ b/.github/workflows/pr-pull-request.yml @@ -0,0 +1,33 @@ +name: Pull Request +on: + pull_request: + branches: + - master + +jobs: + auto_assign: + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v1.1.1 + with: + configuration-path: ".github/workflows/auto_assign.yml" + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Install Dependencies + run: npm install + - name: Run Tests + env: + CI: true + run: npm test + - name: Build + run: npm run build + - name: Archive Production Artifact + uses: actions/upload-artifact@master + with: + name: build + path: build + \ No newline at end of file diff --git a/.github/workflows/pr_assign.yml b/.github/workflows/pr_assign.yml deleted file mode 100644 index a4f3931..0000000 --- a/.github/workflows/pr_assign.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Firebase Deploy -on: - pull_request: - branches: - - master - -jobs: - auto_assign: - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/auto-assign-action@v1.1.1 - with: - configuration-path: ".github/workflows/auto_assign.yml" - \ No newline at end of file From 488d414f56f938f672ec96e33aab1a5934e7f3b4 Mon Sep 17 00:00:00 2001 From: Pramod Mali Date: Mon, 27 Jul 2020 17:17:13 +0530 Subject: [PATCH 3/3] Update job names --- .github/workflows/pr-pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-pull-request.yml b/.github/workflows/pr-pull-request.yml index 70b1fdc..ac03822 100644 --- a/.github/workflows/pr-pull-request.yml +++ b/.github/workflows/pr-pull-request.yml @@ -5,7 +5,8 @@ on: - master jobs: - auto_assign: + autoAssign: + name: Auto Assign runs-on: ubuntu-latest steps: - uses: kentaro-m/auto-assign-action@v1.1.1