From d61cf27d7406248c5c857b5b56ca9a3ddff75fd8 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Mon, 8 Jun 2020 21:03:51 -0400 Subject: [PATCH] Turn off the project workflow, reorg some CI jobs (#451) * Remove 'assign to project' workflow Doesn't work with external PRs. * Reorg CI jobs a bit * Also upgrade gcloud sdk to version 295.0.0 --- .github/workflows/assign-to-project.yml | 24 ------------------------ .github/workflows/{main.yml => pr.yml} | 22 +--------------------- .github/workflows/push.yml | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/assign-to-project.yml rename .github/workflows/{main.yml => pr.yml} (71%) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/assign-to-project.yml b/.github/workflows/assign-to-project.yml deleted file mode 100644 index fe6bb59e..00000000 --- a/.github/workflows/assign-to-project.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Project - -on: - issues: - types: [opened] - pull_request: - types: [opened] - -jobs: - assign: - runs-on: ubuntu-latest - steps: - - uses: alex-page/github-project-automation-plus@v0.2.4 - if: github.event_name == 'issues' && github.event.action == 'opened' - with: - project: Zebra - column: To Do - repo-token: ${{ secrets.PROJECT_AUTOMATION }} - - uses: alex-page/github-project-automation-plus@v0.2.4 - if: github.event_name == 'pull_request' && github.event.action == 'opened' - with: - project: Zebra - column: In progress - repo-token: ${{ secrets.PROJECT_AUTOMATION }} diff --git a/.github/workflows/main.yml b/.github/workflows/pr.yml similarity index 71% rename from .github/workflows/main.yml rename to .github/workflows/pr.yml index 6ac5bfde..9bcfa694 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/pr.yml @@ -1,34 +1,14 @@ name: CI on: - push: - branches: - - main pull_request: branches: - main jobs: - build: - name: Google Cloud Build - # This is a pull request, and gcloud would fail for external PRs. - if: (!github.head_ref) || (!github.base_ref) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - version: '275.0.0' - service_account_key: ${{ secrets.GCLOUD_AUTH }} - - name: Build, Test, Push to GCR - run: | - BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \ - BRANCH_NAME=${BRANCH_NAME,,} && \ - gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME - test: - name: Build and test on ${{ matrix.os }} + name: Build & test on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..1a79c38c --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,20 @@ +name: CI + +on: + push: + +jobs: + build: + name: Google Cloud Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + version: '295.0.0' + service_account_key: ${{ secrets.GCLOUD_AUTH }} + - name: Build, Test, Push to GCR + run: | + BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \ + BRANCH_NAME=${BRANCH_NAME,,} && \ + gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME