Skip to content

Commit

Permalink
Display commit on notifications (#25)
Browse files Browse the repository at this point in the history
* Deploy Network

* Add Permissions

* Minor changes

* Concurrency change

* Destroy Network

* Minor changes

* Minor changes

* Fix commit sha

* Minor changes

* Add Tests

* Disable Tests temporarily

* Nightly Build

* Minor fixes

* Big changes

* Minor changes

* Minor changes

* Minor changes

* Notification fixes

* Notification changes

* Minor changes

* Permissions fixes

* Minor changes

* Notification changes

* Minor changes

* Display commit on notifications
  • Loading branch information
bane authored Jan 26, 2024
1 parent eb4c42c commit dfb9e30
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/notification-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
name: Notification
runs-on: ubuntu-latest
steps:
- name: Short SHA
id: short_sha
run: echo "value=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_OUTPUT
- name: Notify Slack
uses: slackapi/slack-github-action@v1.23.0
env:
Expand Down Expand Up @@ -60,6 +63,15 @@ jobs:
}
]
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Commit: *<https://github.com/${{ github.repository }}/tree/${{ github.sha }}|${{ steps.short_sha.outputs.value }}>*"
}
]
},
{
"type": "context",
"elements": [
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/notification-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
name: Notification
runs-on: ubuntu-latest
steps:
- name: Short SHA
id: short_sha
run: echo "value=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_OUTPUT
- name: Notify Slack
uses: slackapi/slack-github-action@v1.23.0
env:
Expand Down Expand Up @@ -98,6 +101,15 @@ jobs:
}
]
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Commit: *<https://github.com/${{ github.repository }}/tree/${{ github.sha }}|${{ steps.short_sha.outputs.value }}>*"
}
]
},
{
"type": "context",
"elements": [
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/notification-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
name: Notification
runs-on: ubuntu-latest
steps:
- name: Short SHA
id: short_sha
run: echo "value=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_OUTPUT
- name: Notify Slack
uses: slackapi/slack-github-action@v1.23.0
env:
Expand Down Expand Up @@ -60,7 +63,7 @@ jobs:
"elements": [
{
"type": "mrkdwn",
"text": "Commit: *${{ github.sha }}*"
"text": "Commit: *<https://github.com/${{ github.repository }}/tree/${{ github.sha }}|${{ steps.short_sha.outputs.value }}>*"
}
]
},
Expand All @@ -84,22 +87,22 @@ jobs:
},
"style": "${{ inputs.unit_test_output == '' && inputs.fuzz_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.property_polybft_test_output == '' && env.succeed_bnt || env.failed_bnt }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
},
{
"color": "${{ inputs.unit_test_output == '' && inputs.fuzz_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.property_polybft_test_output == '' && env.green_color || env.red_color }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Tests*\n${{ inputs.unit_test_output == '' && 'Unit' || '~Unit~' }}, ${{ inputs.fuzz_test_output == '' && 'Fuzz' || '~Fuzz~' }},\n${{ inputs.e2e_legacy_test_output == '' && 'E2E Legacy' || '~E2E Legacy~' }}, ${{ inputs.e2e_polybft_test_output == '' && 'E2E PolyBFT' || '~E2E PolyBFT~' }},\n${{ inputs.property_polybft_test_output == '' && 'Property PolyBFT' || '~Property PolyBFT~' }}"
}
}
]
}
]
}
]
},
{
"color": "${{ inputs.unit_test_output == '' && inputs.fuzz_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.property_polybft_test_output == '' && env.green_color || env.red_color }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Tests*\n${{ inputs.unit_test_output == '' && 'Unit' || '~Unit~' }}, ${{ inputs.fuzz_test_output == '' && 'Fuzz' || '~Fuzz~' }},\n${{ inputs.e2e_legacy_test_output == '' && 'E2E Legacy' || '~E2E Legacy~' }}, ${{ inputs.e2e_polybft_test_output == '' && 'E2E PolyBFT' || '~E2E PolyBFT~' }},\n${{ inputs.property_polybft_test_output == '' && 'Property PolyBFT' || '~Property PolyBFT~' }}"
}
}
]
}
]
}

0 comments on commit dfb9e30

Please sign in to comment.