Skip to content

update sdk to show faulty rpc #126

update sdk to show faulty rpc

update sdk to show faulty rpc #126

Workflow file for this run

---
name: Build
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
concurrency:
group: build
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: self-hosted-hoprnet-small
strategy:
matrix:
node-version: [22.x, 24.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@ausias/private-registry
with:
node-version: ${{ matrix.node-version }}
- name: Building
run: yarn build
- name: Linting
run: yarn lint:ci
- name: Formatting
run: yarn format:ci
- name: Testing
run: yarn test
publish:
name: Publish
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'
install-sdk: 'true'
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# with:
# driver: kubernetes
- name: Get PR version
id: variables
run: |
BUILD_DATE=$(date +%Y%m%d%H%M%S)
PR_VERSION="$(jq -r '.version' ./package.json)-pr.${{ github.event.pull_request.number }}-${BUILD_DATE}"
echo "PR_VERSION=${PR_VERSION}" >> $GITHUB_OUTPUT
- name: Update package.json version with PR version
run: |
jq --arg version "${{ steps.variables.outputs.PR_VERSION }}" '.version = $version' package.json > package.tmp.json
mv package.tmp.json ./package.json
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
push: true
context: .
file: Dockerfile
tags: ${{ vars.DOCKER_IMAGE_REGISTRY }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ steps.variables.outputs.PR_VERSION }}