Skip to content

Commit

Permalink
feat: Remove slack notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
grossws committed Mar 22, 2023
1 parent b0c1c59 commit 75803bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 92 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build-gradle.yml
Expand Up @@ -28,12 +28,6 @@ on:
nexus-password:
description: Nexus password
required: true
slack-bot-token:
description: Slack bot token
required: false
slack-channel:
description: Slack channel id for notifications, enable notifications if not empty
required: false

permissions:
contents: read
Expand Down Expand Up @@ -118,30 +112,3 @@ jobs:
-PnexusUrl=${{ secrets.nexus-url }} \
-PnexusUsername=${{ secrets.nexus-username }} \
-PnexusPassword=${{ secrets.nexus-password }}
- name: Slack notification
if: ${{ !!env.SLACK_CHANNEL && always() }}
uses: slackapi/slack-github-action@v1.18.0
with:
channel-id: ${{ env.SLACK_CHANNEL }}
payload: |
{
"text": "${{ github.repository }} build *${{ job.status }}*: ${{ env.REF_DESC }}",
"blocks": [
{
"type": "header",
"text": {"type": "plain_text", "text": "${{ github.repository }} build"}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "${{ env.REF_DESC }}"},
{"type": "mrkdwn", "text": "Status: *${{ job.status }}*"},
{"type": "mrkdwn", "text": "JDK: *${{ inputs.java-version }} (${{ inputs.java-distribution }})*"},
{"type": "mrkdwn", "text": "<${{ env.BASE_URL }}/actions/runs/${{ github.run_id }}|Workflow run>"}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.slack-bot-token }}
59 changes: 0 additions & 59 deletions .github/workflows/release-gradle.yml
Expand Up @@ -23,12 +23,6 @@ on:
nexus-password:
description: Nexus password
required: true
slack-bot-token:
description: Slack bot token
required: true
slack-channel:
description: Slack channel id for notifications, enable notifications if not empty
required: true

permissions:
contents: read
Expand Down Expand Up @@ -57,32 +51,6 @@ jobs:
java-version: ${{ inputs.java-version }}
distribution: ${{ inputs.java-distribution }}

- name: Slack notification
uses: slackapi/slack-github-action@v1.18.0
with:
channel-id: ${{ secrets.slack-channel }}
payload: |
{
"text": "${{ github.repository }} release ${{ github.ref_name }} *started*",
"blocks": [
{
"type": "header",
"text": {"type": "plain_text", "text": "${{ github.repository }} release"}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "Release <${{ env.BASE_URL }}/tree/${{ github.ref_name }}|`${{ github.ref_name }}`>"},
{"type": "mrkdwn", "text": "Status: *started*"},
{"type": "mrkdwn", "text": "JDK: *${{ inputs.java-version }} (${{ inputs.java-distribution }})*"},
{"type": "mrkdwn", "text": "<${{ env.BASE_URL }}/actions/runs/${{ github.run_id }}|Workflow run>"}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.slack-bot-token }}

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -96,30 +64,3 @@ jobs:
-PnexusUrl=${{ secrets.nexus-url }} \
-PnexusUsername=${{ secrets.nexus-username }} \
-PnexusPassword=${{ secrets.nexus-password }}
- name: Slack notification
if: ${{ always() }}
uses: slackapi/slack-github-action@v1.18.0
with:
channel-id: ${{ secrets.slack-channel }}
payload: |
{
"text": "${{ github.repository }} release ${{ github.ref_name }} *${{ job.status }}*",
"blocks": [
{
"type": "header",
"text": {"type": "plain_text", "text": "${{ github.repository }} release"}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "Release <${{ env.BASE_URL }}/tree/${{ github.ref_name }}|`${{ github.ref_name }}`>"},
{"type": "mrkdwn", "text": "Status: *${{ job.status }}*"},
{"type": "mrkdwn", "text": "JDK: *${{ inputs.java-version }} (${{ inputs.java-distribution }})*"},
{"type": "mrkdwn", "text": "<${{ env.BASE_URL }}/actions/runs/${{ github.run_id }}|Workflow run>"}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.slack-bot-token }}

0 comments on commit 75803bf

Please sign in to comment.