From adaa4b7a7bbb4fd4c1aaef4cf08c4bec7415a872 Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Mon, 4 Oct 2021 12:10:00 +0000 Subject: [PATCH] run gh action only if test succ --- .github/workflows/docker-publish.yml | 8 ++++---- .github/workflows/e2e.yml | 7 +++---- .github/workflows/go.yml | 3 +-- .github/workflows/snap.yaml | 6 ++++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e1a5e397..3e8d39b3 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -6,10 +6,10 @@ name: Docker # documentation. on: - push: - branches: [ master ] - # Publish semver tags as releases. - tags: [ 'v*.*.*' ] + workflow_run: + workflows: ["E2E"] + types: [completed] + branches: [master] env: # Use docker.io for Docker Hub if empty diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 73f9d765..d2bcc2b7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,10 +1,9 @@ name: E2E on: - push: - branches: [ master ] - pull_request: - types: [assigned, opened, synchronize, reopened] + workflow_run: + workflows: ["Go"] + types: [completed] jobs: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 88f73430..6c20beb5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: types: [assigned, opened, synchronize, reopened] + tags: [ 'v*.*.*' ] jobs: @@ -15,8 +16,6 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v2 - with: - go-version: ^1.14 id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index 3a04ae6c..b4ae9df0 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -1,8 +1,10 @@ name: Snap package on: - push: - branches: [ master ] + workflow_run: + workflows: ["E2E"] + types: [completed] + branches: [master] jobs: