diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 74fc230eda..5444b938be 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -7,6 +7,9 @@ on: paths: - 'packages/hop-node/**' - 'packages/v2-explorer-backend/**' + - 'packages/v1-hop-api/**' + - 'packages/v1-hop-explorer-backend/**' + - 'packages/v1-stats-worker/**' env: DOCKER_TAG: ${{ (github.ref_name == 'develop' && 'unstable') || (github.ref_name == 'production' && 'latest') }} @@ -15,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - package-name: ['hop-node', 'v2-explorer-backend'] + package-name: ['hop-node', 'v2-explorer-backend', 'v1-hop-api', 'v1-hop-explorer-backend', 'v1-stats-worker'] steps: - name: Checkout code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b @@ -42,3 +45,27 @@ jobs: file: ./packages/${{ matrix.package-name }}/Dockerfile tags: hopprotocol/${{ matrix.package-name }}:${{ env.DOCKER_TAG }} push: true + + # status-notify: + # needs: [publish-docker] + # runs-on: ubuntu-latest + # environment: production + # strategy: + # matrix: + # secret-key: ['HOP_API', 'HOP_EXPLORER', 'STATS_WORKER'] + # steps: + # - name: Notify webhook + # run: | + # WEBHOOK_URL=$(echo ${{ 'WEBOOK_URL_' + secrets[PACKAGE_NAME_UPPER] }}) + # WEBHOOK_SECRET=$(echo ${{ 'WEBHOOK_SECRET' + secrets[PACKAGE_NAME_UPPER] }}) + + # STATUS="failed" + # if ${{ job.status == 'success' }}; then + # STATUS="success" + # fi + + # curl "$WEBHOOK_URL" \ + # -H "X-Secret: $WEBHOOK_SECRET" \ + # -d '{"payload": {"reponame": "${{ github.repository }}", "branch": "${{ github.ref_name }}", "build_parameters": {"GITHUB_JOB": "${{ github.job }}"}, "outcome": "'$STATUS'", "build_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}' \ + # -H "Content-Type: application/json" \ + # -X POST diff --git a/.github/workflows/status-notify.yml b/.github/workflows/status-notify.yml deleted file mode 100644 index c3477d37af..0000000000 --- a/.github/workflows/status-notify.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Send Webhook Notification -on: - workflow_call: - inputs: - environment: - type: string - description: environment to deploy to - required: true - secrets: - WEBHOOK_URL: - required: true - WEBHOOK_SECRET: - required: true - -jobs: - status-notify: - runs-on: ubuntu-latest - environment: ${{ inputs.environment }} - steps: - - name: Notify webhook - run: | - STATUS="failed" - if ${{ job.status == 'success' }}; then - STATUS="success" - fi - - curl "${{ secrets.WEBHOOK_URL }}" \ - -H "X-Secret: ${{ secrets.WEBHOOK_SECRET }}" \ - -d '{"payload": {"reponame": "${{ github.repository }}", "branch": "${{ github.ref_name }}", "build_parameters": {"GITHUB_JOB": "${{ github.job }}"}, "outcome": "'$STATUS'", "build_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}' \ - -H "Content-Type: application/json" \ - -X POST diff --git a/.github/workflows/v1-hop-api.yml b/.github/workflows/v1-hop-api.yml deleted file mode 100644 index 6b5598eb97..0000000000 --- a/.github/workflows/v1-hop-api.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Build and Push Hop API Docker Image - -on: - push: - branches: - - hop-api - workflow_dispatch: - -jobs: - _build-hop-api: - runs-on: ubuntu-latest - environment: production - env: - DOCKER_IMAGE: hopprotocol/hop-api - steps: - - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb - - - name: Login to Docker Hub - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build application Docker image - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 - with: - context: . - file: ./packages/api/Dockerfile - build-args: GIT_REV=${{ github.sha }} - tags: app - load: true - push: false - - - name: Push Hop API Docker image to Docker Hub - run: | - BRANCH=${GITHUB_REF##*/} - BRANCH=$(echo $BRANCH | sed 's/\//-/g') - docker tag app $DOCKER_IMAGE:${{ github.sha }} - docker tag app $DOCKER_IMAGE:$BRANCH - docker push $DOCKER_IMAGE:${{ github.sha }} - docker push $DOCKER_IMAGE:$BRANCH - if [ "$BRANCH" == "hop-api" ]; then - docker tag app $DOCKER_IMAGE:latest - docker push $DOCKER_IMAGE:latest - fi - - build-hop-api: - needs: [_build-hop-api] - name: Send Status Notification Webhook Request - uses: ./.github/workflows/status-notify.yml - with: - environment: production - secrets: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL_HOP_API }} - WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} diff --git a/.github/workflows/v1-hop-explorer-backend.yml b/.github/workflows/v1-hop-explorer-backend.yml deleted file mode 100644 index ea8c454125..0000000000 --- a/.github/workflows/v1-hop-explorer-backend.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Build and Push Hop Explorer Backend Docker Image - -on: - push: - branches: - - explorer-backend-production - - explorer-backend-goerli - - explorer-backend-sepolia - -jobs: - prepare: - runs-on: ubuntu-latest - outputs: - branch_name: ${{ steps.extract_branch.outputs.branch }} - steps: - - name: Extract branch name - id: extract_branch - run: echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT - - _build-explorer-backend: - runs-on: ubuntu-latest - environment: production - env: - DOCKER_IMAGE: hopprotocol/explorer-backend - defaults: - run: - working-directory: . - steps: - - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb - - - name: Build application Docker image - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 - with: - context: . - file: ./packages/explorer-backend/Dockerfile - build-args: GIT_REV=${{ github.sha }} - tags: app - load: true - push: false - - - name: Login to Docker Hub - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push Explorer Backend Docker image to Docker Hub - run: | - BRANCH=${GITHUB_REF##*/} - BRANCH=$(echo $BRANCH | sed 's/\//-/g' | sed 's/explorer-backend-//g') - docker tag app $DOCKER_IMAGE:${{ github.sha }} - docker tag app $DOCKER_IMAGE:$BRANCH - docker push $DOCKER_IMAGE:${{ github.sha }} - docker push $DOCKER_IMAGE:$BRANCH - if [ "$BRANCH" == "production" ]; then - docker tag app $DOCKER_IMAGE:latest - docker push $DOCKER_IMAGE:latest - fi - - build-explorer-backend: - needs: [prepare, _build-explorer-backend] - name: Send Backend Status Notification Webhook Request - uses: ./.github/workflows/status-notify.yml - with: - environment: ${{ needs.prepare.outputs.branch_name }} - secrets: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} diff --git a/.github/workflows/v1-stats-worker.yml b/.github/workflows/v1-stats-worker.yml deleted file mode 100644 index d0e437e9cb..0000000000 --- a/.github/workflows/v1-stats-worker.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Build and Push Hop Stats Worker Docker Image - -on: - push: - branches: - - stats-worker - workflow_dispatch: - -jobs: - _build-stats-worker: - runs-on: ubuntu-latest - environment: production - env: - DOCKER_IMAGE: hopprotocol/stats-worker - steps: - - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb - - - name: Build application Docker image - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 - with: - context: . - file: ./packages/stats-worker/Dockerfile - build-args: GIT_REV=${{ github.sha }} - tags: app - load: true - push: false - - - name: Login to Docker Hub - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push Hop Stats Worker Docker image to Docker Hub - run: | - BRANCH=${GITHUB_REF##*/} - BRANCH=$(echo $BRANCH | sed 's/\//-/g') - docker tag app $DOCKER_IMAGE:${{ github.sha }} - docker tag app $DOCKER_IMAGE:$BRANCH - docker push $DOCKER_IMAGE:${{ github.sha }} - docker push $DOCKER_IMAGE:$BRANCH - if [ "$BRANCH" == "stats-worker" ]; then - docker tag app $DOCKER_IMAGE:latest - docker push $DOCKER_IMAGE:latest - fi - - build-stats-worker: - needs: [_stats-worker-notify-1] - name: Send S3 Stats Worker Status Notification Webhook Request - uses: ./.github/workflows/status-notify.yml - with: - environment: production - secrets: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL_STATS_WORKER_S3 }} - WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} - - _stats-worker-notify-1: - needs: [_build-stats-worker] - name: Send Stats Worker Status Notification Webhook Request - uses: ./.github/workflows/status-notify.yml - with: - environment: production - secrets: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL_STATS_WORKER }} - WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 964fcd397f..c98e32a6ac 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@hop-protocol/frontend", - "version": "0.0.0", + "version": "0.0.1", "description": "Hop Protocol Frontend", "author": "Authereum Labs, Inc.", "license": "MIT", diff --git a/packages/frontend/src/config/addresses.ts b/packages/frontend/src/config/addresses.ts index 0a20fd5c89..becfabd960 100644 --- a/packages/frontend/src/config/addresses.ts +++ b/packages/frontend/src/config/addresses.ts @@ -78,6 +78,13 @@ if (process.env.NODE_ENV !== 'test') { console.debug('config addresses:', addresses.tokens) console.debug('deprecated tokens:', process.env.REACT_APP_DEPRECATED_TOKENS) console.debug('deprecated pools:', process.env.REACT_APP_DEPRECATED_POOLS) + console.debug('PUBLIC_URL:', process.env.PUBLIC_URL) + console.debug('NODE_VERSION:', process.env.NODE_VERSION) + console.debug('REACT_APP_DISABLE_NATIVE_ASSET_TRANSFERS:', process.env.REACT_APP_DISABLE_NATIVE_ASSET_TRANSFERS) + console.debug('REACT_APP_ENABLED_CHAINS:', process.env.REACT_APP_ENABLED_CHAINS) + console.debug('REACT_APP_ENABLED_TOKENS:', process.env.REACT_APP_ENABLED_TOKENS) + console.debug('REACT_APP_NETWORK:', process.env.REACT_APP_NETWORK) + console.debug('REACT_APP_BNC_DAPP_ID:', process.env.REACT_APP_BNC_DAPP_ID) } const blocknativeDappid = process.env.REACT_APP_BNC_DAPP_ID diff --git a/packages/hop-node/package.json b/packages/hop-node/package.json index 733a93469d..a15059aad2 100644 --- a/packages/hop-node/package.json +++ b/packages/hop-node/package.json @@ -1,6 +1,6 @@ { "name": "@hop-protocol/hop-node", - "version": "0.0.2", + "version": "0.0.3", "description": "The V1 Hop Node for Hop Protocol", "author": "Authereum Labs, Inc.", "license": "MIT", diff --git a/packages/v2-explorer-backend/package.json b/packages/v2-explorer-backend/package.json index 258161dfa0..069eb74263 100644 --- a/packages/v2-explorer-backend/package.json +++ b/packages/v2-explorer-backend/package.json @@ -1,6 +1,6 @@ { "name": "@hop-protocol/v2-explorer-backend", - "version": "0.0.5", + "version": "0.0.6", "description": "The Hop v2 explorer backend", "main": "dist/index.js", "author": "Authereum Labs, Inc.",