From 4274d7e4a694e9cf4380b3586da2a612e2cb91fc Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Wed, 21 Dec 2022 09:10:45 -0800 Subject: [PATCH] do not run release on pr (#113) --- .github/workflows/docker-publish.yml | 8 ++------ .github/workflows/e2e.yml | 2 -- .github/workflows/go.yml | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 91e7a74d..5a6d8a3d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -6,16 +6,12 @@ name: Docker # documentation. on: - workflow_run: - workflows: ["E2E"] - types: [completed] - branches: [master] - tags: [ 'v*.*.*' ] + release: + types: [ released ] jobs: build: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} permissions: contents: read packages: write diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 72b77ee3..eae2ea19 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -5,8 +5,6 @@ on: branches: [ master ] pull_request: types: [assigned, opened, synchronize, reopened] - release: - types: [ released ] jobs: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index eca4098a..e5d1d0b0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,8 +5,6 @@ on: branches: [ master ] pull_request: types: [assigned, opened, synchronize, reopened] - release: - types: [ released ] jobs: @@ -49,5 +47,7 @@ jobs: - name: create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: github.ref == 'refs/heads/master' run: | gh release create -d --generate-notes v$NBGV_SimpleVersion + gh release list | grep Draft | tail -n +3 | cut -f 1 | xargs -r -L 1 gh release delete --yes