Skip to content

Commit

Permalink
Trigger CI builds on pull requests
Browse files Browse the repository at this point in the history
... but upload only tags or pyshes to develop branch

Signed-off-by: Vasyl Gello <[email protected]>
  • Loading branch information
basilgello committed Aug 6, 2024
1 parent 40be550 commit 2e92eee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Trunk / release build

on:
pull_request:
paths-ignore:
- "README.md"
push:
branches:
- develop
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2e92eee

Please sign in to comment.