diff --git a/.github/workflows/k3d.yaml b/.github/workflows/k3d.yaml index 6d5d204..e3befa3 100644 --- a/.github/workflows/k3d.yaml +++ b/.github/workflows/k3d.yaml @@ -133,14 +133,10 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | - curl -X POST -H 'Content-type: application/json' --data "{ - \"text\": \"✅ K3d Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*K3d Version*: ${{ matrix.k3d }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\" - }" $SLACK_WEBHOOK_URL + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ K3d deployment successful on ${{ matrix.os }} (${{ matrix.k3d }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL - name: Send Slack Notification on Failure if: failure() env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | - curl -X POST -H 'Content-type: application/json' --data "{ - \"text\": \"❌ K3d Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*K3d Version*: ${{ matrix.k3d }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\" - }" $SLACK_WEBHOOK_URL \ No newline at end of file + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ K3d deployment failed on ${{ matrix.os }} (${{ matrix.k3d }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL \ No newline at end of file diff --git a/.github/workflows/kind.yaml b/.github/workflows/kind.yaml index a1bba31..c7d5973 100644 --- a/.github/workflows/kind.yaml +++ b/.github/workflows/kind.yaml @@ -129,14 +129,10 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | - curl -X POST -H 'Content-type: application/json' --data "{ - \"text\": \"✅ Kind Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\" - }" $SLACK_WEBHOOK_URL + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ Kind deployment successful on ${{ matrix.os }} (${{ matrix.kind }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL - name: Send Slack Notification on Failure if: failure() env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | - curl -X POST -H 'Content-type: application/json' --data "{ - \"text\": \"❌ Kind Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\" - }" $SLACK_WEBHOOK_URL \ No newline at end of file + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ Kind deployment failed on ${{ matrix.os }} (${{ matrix.kind }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL \ No newline at end of file diff --git a/.github/workflows/kustomize.yaml b/.github/workflows/kustomize.yaml index 8a8d976..39b9a31 100644 --- a/.github/workflows/kustomize.yaml +++ b/.github/workflows/kustomize.yaml @@ -29,19 +29,15 @@ jobs: kubectl get sc - name: Checkout repository uses: actions/checkout@v2 - # - name: Send Slack Notification on Success - # if: success() - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - # run: | - # curl -X POST -H 'Content-type: application/json' --data "{ - # \"text\": \"✅ Kustomize Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\" - # }" $SLACK_WEBHOOK_URL - # - name: Send Slack Notification on Failure - # if: failure() - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - # run: | - # curl -X POST -H 'Content-type: application/json' --data "{ - # \"text\": \"❌ Kustomize Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\" - # }" $SLACK_WEBHOOK_URL \ No newline at end of file + - name: Send Slack Notification on Success + if: success() + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + run: | + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ Kustomize deployment successful on ${{ matrix.os }} (${{ matrix.kind }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL + - name: Send Slack Notification on Failure + if: failure() + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + run: | + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ Kustomize deployment failed on ${{ matrix.os }} (${{ matrix.kind }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL \ No newline at end of file diff --git a/.github/workflows/microk8s.yaml b/.github/workflows/microk8s.yaml index ea5f5be..331dac9 100644 --- a/.github/workflows/microk8s.yaml +++ b/.github/workflows/microk8s.yaml @@ -122,15 +122,11 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | - curl -X POST -H 'Content-type: application/json' --data "{ - \"text\": \"✅ MicroK8s Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*MicroK8s Version*: ${{ matrix.microk8s }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\" - }" $SLACK_WEBHOOK_URL + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ MicroK8s deployment successful on ${{ matrix.os }} (${{ matrix.microk8s }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL - name: Send Slack Notification on Failure if: failure() env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | - curl -X POST -H 'Content-type: application/json' --data "{ - \"text\": \"❌ MicroK8s Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*MicroK8s Version*: ${{ matrix.microk8s }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\" - }" $SLACK_WEBHOOK_URL + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ MicroK8s deployment failed on ${{ matrix.os }} (${{ matrix.microk8s }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL \ No newline at end of file