Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat: PR will trigger build and push of docker image in pattern pull-NUMBER

Ankit Nayan77c0237ba187
diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml
index cf0242c7d3..93dd282cc8 100644
--- a/.github/workflows/push.yaml
+++ b/.github/workflows/push.yaml
@@ -6,7 +6,13 @@ on:
- ^v[0-9]*.[0-9]*.x$
tags:
- "*"
-
+ pull_request:
+ branches:
+ - main
+ - v*
+ paths:
+ - 'pkg/**'
+ - 'frontend/**'
jobs:
get-envs:
runs-on: ubuntu-latest
@@ -21,6 +27,9 @@ jobs:
then
echo "tag build"
img_tag=${GITHUB_REF#refs/*/v}
+ elif [ ${array[1]} == "pull" ]
+ then
+ img_tag="pull-${{ github.event.number }}"
else
echo "non tag build"
img_tag="latest"
@@ -74,7 +83,7 @@ jobs:
run: |
branch=${GITHUB_REF#refs/*/}
array=(`echo ${GITHUB_REF} | sed 's/\//\n/g'`)
- if [ $branch == "main" ] || [ ${array[1]} == "tags" ] || [[ $branch =~ ^v[0-9]*.[0-9]*.x$ ]]
+ if [ $branch == "main" ] || [ ${array[1]} == "tags" ] || [ ${array[1]} == "pull" ] || [[ $branch =~ ^v[0-9]*.[0-9]*.x$ ]]
then
source env-vars
make build-push-frontend
@@ -115,7 +124,7 @@ jobs:
run: |
branch=${GITHUB_REF#refs/*/}
array=(`echo ${GITHUB_REF} | sed 's/\//\n/g'`)
- if [ $branch == "main" ] || [ ${array[1]} == "tags" ] || [[ $branch =~ ^v[0-9]*.[0-9]*.x$ ]]
+ if [ $branch == "main" ] || [ ${array[1]} == "tags" ] || [ ${array[1]} == "pull" ] ||[[ $branch =~ ^v[0-9]*.[0-9]*.x$ ]]
then
source env-vars
make build-push-query-service
@@ -156,7 +165,7 @@ jobs:
run: |
branch=${GITHUB_REF#refs/*/}
array=(`echo ${GITHUB_REF} | sed 's/\//\n/g'`)
- if [ $branch == "main" ] || [ ${array[1]} == "tags" ] || [[ $branch =~ ^v[0-9]*.[0-9]*.x$ ]]
+ if [ $branch == "main" ] || [ ${array[1]} == "tags" ] || [ ${array[1]} == "pull" ] || [[ $branch =~ ^v[0-9]*.[0-9]*.x$ ]]
then
source env-vars
make build-push-flattener