From e88bb69782d858f2c20302021e4b6d4d2f82ca56 Mon Sep 17 00:00:00 2001 From: Shubham Prajapati Date: Tue, 25 Feb 2025 15:22:15 +0530 Subject: [PATCH 1/2] adiing standard build --- .github/workflows/standard-build.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/standard-build.yml diff --git a/.github/workflows/standard-build.yml b/.github/workflows/standard-build.yml new file mode 100644 index 00000000..08c4df76 --- /dev/null +++ b/.github/workflows/standard-build.yml @@ -0,0 +1,36 @@ +name: "Build and Push to GHCR" + +on: + push: + branches-ignore: + - main + - prod + - aws_prod + +jobs: + build_push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ secrets.GHCR_USERNAME }} + password: ${{ secrets.GHCR_TOKEN }} + + - name: Build and Push Docker Image + run: | + export CURRENT_BRANCH=${GITHUB_REF#refs/heads/} + export TAG=$([[ $CURRENT_BRANCH == $(basename ${{ github.ref }}) ]] && echo $CURRENT_BRANCH || echo "latest") + echo $TAG + export GITHUB_REF_IMAGE=ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA + export GITHUB_BRANCH_IMAGE=ghcr.io/$GITHUB_REPOSITORY:$TAG + export GITHUB_REF_IMAGE=$(echo $GITHUB_REF_IMAGE | tr '[:upper:]' '[:lower:]') + export GITHUB_BRANCH_IMAGE=$(echo $GITHUB_BRANCH_IMAGE | tr '[:upper:]' '[:lower:]') + docker build --build-arg version=$GITHUB_SHA -t $GITHUB_REF_IMAGE -t $GITHUB_BRANCH_IMAGE . + echo "Pushing Image to GitHub Container Registry" + docker push $GITHUB_REF_IMAGE + docker push $GITHUB_BRANCH_IMAGE From 1f0ea88060df42cbe69f3af4409e98b9c522ab99 Mon Sep 17 00:00:00 2001 From: Shubham Prajapati Date: Mon, 10 Mar 2025 22:37:44 +0530 Subject: [PATCH 2/2] `Update error message in GetFlowId function to reflect change in validation logic` --- api/v1/flowid/flowid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/flowid/flowid.go b/api/v1/flowid/flowid.go index ac51134e..bf88df97 100644 --- a/api/v1/flowid/flowid.go +++ b/api/v1/flowid/flowid.go @@ -35,7 +35,7 @@ func GetFlowId(c *gin.Context) { if chain_symbol != "sol" { _, err := hexutil.Decode(walletAddress) if err != nil { - httpo.NewErrorResponse(http.StatusBadRequest, "Wallet address (walletAddress) is not valid").SendD(c) + httpo.NewErrorResponse(http.StatusBadRequest, "Please pass the valid chain name").SendD(c) return } }