From 2e92eee4e86d1af1d2631d3a3a5ad70a0d1f032a Mon Sep 17 00:00:00 2001 From: Vasyl Gello Date: Tue, 6 Aug 2024 16:07:36 +0300 Subject: [PATCH] Trigger CI builds on pull requests ... but upload only tags or pyshes to develop branch Signed-off-by: Vasyl Gello --- .github/workflows/trunk.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index b52ae5c..32385e7 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -1,6 +1,9 @@ name: Trunk / release build on: + pull_request: + paths-ignore: + - "README.md" push: branches: - develop @@ -38,11 +41,11 @@ jobs: run: | if [ "${{ github.ref_type }}" = "tag" ]; then echo "RELEASENAME=${{ github.ref_name }}" >> "$GITHUB_ENV" - elif [ "${{ github.ref }}" = "refs/heads/develop" ]; then + elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref }}" = "refs/heads/develop" ]; then echo "PRERELEASE=--prerelease" >> "$GITHUB_ENV" echo "RELEASENAME=trunk" >> "$GITHUB_ENV" else - echo "Not a tag or develop branch, skipping upload" + echo "Not a tag or push to develop branch, skipping upload" echo "SKIP_UPLOAD=1" >> "$GITHUB_ENV" fi