Skip to content

Commit

Permalink
gh: modernize status notify
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed May 15, 2024
1 parent d370518 commit 211397a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 31 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,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
31 changes: 0 additions & 31 deletions .github/workflows/status-notify.yml

This file was deleted.

0 comments on commit 211397a

Please sign in to comment.