Skip to content

Overall improvements in node admin for HOPRd 2.1.5 #16

Overall improvements in node admin for HOPRd 2.1.5

Overall improvements in node admin for HOPRd 2.1.5 #16

Workflow file for this run

---
name: Build
on:
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: [20.x, 22.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
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: self-hosted-hoprnet-small
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: |
PR_VERSION="$(jq -r '.version' ./package.json)-pr.${{ github.event.pull_request.number }}"
echo "PR_VERSION=${PR_VERSION}" >> $GITHUB_OUTPUT
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ vars.DOCKER_IMAGE_REGISTRY }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ steps.variables.outputs.PR_VERSION }}