Skip to content

Commit

Permalink
add teams webhook (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
unglaublicherdude authored Jul 24, 2023
1 parent c82c945 commit 03912fe
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci-dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- "dotnet/**"
- ".github/workflows/ci-dotnet.yaml"
workflow_dispatch:

jobs:
build-dotnet:
name: Build & Test C# SDK
Expand Down Expand Up @@ -98,3 +98,10 @@ jobs:
NUGET_FEED: https://api.nuget.org/v3/index.json
run: dotnet nuget push src/Vaas/bin/Release/*.nupkg --skip-duplicate --source $NUGET_FEED --api-key $NUGET_KEY
working-directory: dotnet/Vaas

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
11 changes: 9 additions & 2 deletions .github/workflows/ci-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- "golang/vaas/**"
- ".github/workflows/ci-golang.yaml"
workflow_dispatch:

jobs:
build-golang:
runs-on: ubuntu-latest
Expand All @@ -35,7 +35,7 @@ jobs:
VAAS_URL: "wss://gateway.staging.vaas.gdatasecurity.de"
TOKEN_URL: "https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token"
run: go test ./...
working-directory: golang/vaas/
working-directory: golang/vaas/
- name: run tests
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/go')
env:
Expand All @@ -48,3 +48,10 @@ jobs:
- name: publish module
if: startsWith(github.ref, 'refs/tags/go')
run: GOPROXY=proxy.golang.org go list -m github.com/GDATASoftwareAG/vaas/golang/vaas@go${GITHUB_REF#refs/tags/go}

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
12 changes: 9 additions & 3 deletions .github/workflows/ci-java-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "java/**"
- ".github/workflows/ci-java-legacy.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-java-legacy:
Expand Down Expand Up @@ -93,13 +93,12 @@ jobs:
if: startsWith(github.ref, 'refs/tags/legacy-java')
run: |
sed -i "s/version = '0\.0\.0'/version = '$RELEASE_VERSION'/g" ./java/build.gradle
- name: set legacy name
if: startsWith(github.ref, 'refs/tags/legacy-java')
run: |
echo "rootProject.name = 'vaas-legacy'" > ./java/settings.gradle
- name: publish Maven package
if: startsWith(github.ref, 'refs/tags/legacy-java')
env:
Expand All @@ -123,3 +122,10 @@ jobs:
arguments: closeAndReleaseRepository
gradle-version: "8.1"
build-root-directory: java

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
9 changes: 8 additions & 1 deletion .github/workflows/ci-java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "java/**"
- ".github/workflows/ci-java.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-java:
Expand Down Expand Up @@ -117,3 +117,10 @@ jobs:
arguments: closeAndReleaseRepository
gradle-version: "8.1"
build-root-directory: java

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
9 changes: 8 additions & 1 deletion .github/workflows/ci-php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "php/**"
- ".github/workflows/ci-php.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-php:
Expand Down Expand Up @@ -110,3 +110,10 @@ jobs:
env:
PACKAGIST_API_TOKEN: ${{ secrets.PACKAGIST_API_TOKEN }}
run: curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=gdatacyberdefense&apiToken=$PACKAGIST_API_TOKEN" -d'{"repository":{"url":"https://packagist.org/packages/gdata/vaas"}}'

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
9 changes: 8 additions & 1 deletion .github/workflows/ci-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "python/**"
- ".github/workflows/ci-python.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-python:
Expand Down Expand Up @@ -95,3 +95,10 @@ jobs:
packages_dir: python/dist
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
13 changes: 10 additions & 3 deletions .github/workflows/ci-ruby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "ruby/**"
- ".github/workflows/ci-ruby.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-ruby:
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
ruby-version: "3.1" # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: extract version
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/rb')
env:
RUBY_GEMS_TOKEN: ${{ secrets.RUBY_GEMS_TOKEN }}
run: |
run: |
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
Expand All @@ -106,3 +106,10 @@ jobs:
gem update --system
gem push "vaas-$RELEASE_VERSION.gem"
working-directory: ruby

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
9 changes: 8 additions & 1 deletion .github/workflows/ci-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "rust/**"
- ".github/workflows/ci-rust.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-rust:
Expand Down Expand Up @@ -69,3 +69,10 @@ jobs:
if: startsWith(github.ref, 'refs/tags/rs')
run: cargo publish --allow-dirty --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
working-directory: rust

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
9 changes: 8 additions & 1 deletion .github/workflows/ci-typescript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- "typescript/**"
- ".github/workflows/ci-typescript.yaml"
workflow_dispatch:
workflow_dispatch:

jobs:
build-typescript:
Expand Down Expand Up @@ -104,3 +104,10 @@ jobs:
working-directory: typescript
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"
11 changes: 9 additions & 2 deletions .github/workflows/vulncheck-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ".github/workflows/vulncheck-golang.yml"
tags:
- "go*"
workflow_dispatch:
workflow_dispatch:

jobs:
vulncheck:
Expand All @@ -25,7 +25,14 @@ jobs:
run: go install golang.org/x/vuln/cmd/govulncheck@latest
shell: bash
- name: Run govulncheck

run: govulncheck ./...
working-directory: golang/vaas/
shell: bash

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Failed workflow on for VaaS-SDK ${workflow}`, sections: [{activityTitle: 'build failed', activitySubtitle: `Failed workflow on for VaaS-SDK ${workflow}`, activityImage: 'https://adaptivecards.io/content/cats/3.png'}], themeColor: '#ff0000'}"

0 comments on commit 03912fe

Please sign in to comment.