Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Slack Notifications #17021

Merged
merged 15 commits into from
Jan 10, 2025
Merged
6 changes: 2 additions & 4 deletions .github/workflows/alert_MBUsers_Inactive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
echo -e "$messageInactiveUsers">> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT


- name: Slack Notification
uses: ./.github/actions/notifications
with:
Expand All @@ -49,8 +48,7 @@ jobs:
message: |
${{ steps.users_out.outputs.MESSAGE_RESPONSE }}
icon-emoji: ':hourglass_flowing_sand:'
channel: pagerduty-alert-dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: warning
slackify-markdown: true

4 changes: 2 additions & 2 deletions .github/workflows/alert_cert_expire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
message: |
${{ steps.format_out.outputs.LIST }}
icon-emoji: ':bell:'
channel: pagerduty-alert-dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: warning

- name: Remove Runner IP from the KeyVault Firewalls
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/alert_resource_costs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
* **Provisioned by: \`${{ steps.last-pusher.outputs.username }}\`**
* **Last Change Date: \`${{ steps.last-pusher.outputs.last_change_date }}\`**
icon-emoji: ':money_with_wings:'
channel: prime-reportstream-engineering
channel: notifications
bethbeza marked this conversation as resolved.
Show resolved Hide resolved
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
color: failure
slackify-markdown: true
5 changes: 2 additions & 3 deletions .github/workflows/alert_terraform_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
tf-auth: true

- name: Collect Terraform stats

uses: josiahsiegel/terraform-stats@68b8cbe42c494333fbf6f8d90ac86da1fb69dcc2
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/terraform-stats

Expand Down Expand Up @@ -66,6 +65,6 @@ jobs:
"resource-drifts": "${{ env.resource-drifts }}"

icon-emoji: ':bell:'
channel: pagerduty-alert-dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: warning
47 changes: 47 additions & 0 deletions .github/workflows/dependabot-scheduler.yml
bethbeza marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Automate Dependency Updates

on:
push:
branches:
- "dependabot/*"

jobs:
update-dependencies:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Create a new branch
run: |
git checkout -b update-branch
git push origin update-branch

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT_TOKEN }}
branch: update-branch
title: "Automated Dependency Updates"
body: "Automated dependency updates from GitHub Actions."
base: main
commit-message: "Update dependencies"

- name: Merge Pull Request
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
await github.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
merge_method: "squash"
});
github-token: ${{ secrets.PAT_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/disable-dependabot.yml
bethbeza marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Disable Dependabot

on:
schedule:
- cron: '0 14 * * *' # Runs daily at 9 AM EST (14 UTC)

jobs:
disable:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Disable Dependabot
run: |
mv .github/dependabot.yml .github/dependabot.yml.disabled
git config user.name "GitHub Action"
git config user.email "[email protected]"
git add .github/dependabot.yml.disabled
git commit -S -m "Disable Dependabot updates"
git push

22 changes: 22 additions & 0 deletions .github/workflows/enable-dependabot.yml
bethbeza marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Enable Dependabot

on:
schedule:
- cron: '0 2 * * *' # Runs daily at 9 PM EST (2 UTC)

jobs:
enable:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Enable Dependabot
run: |
mv .github/dependabot.yml.disabled .github/dependabot.yml
git config user.name "GitHub Action"
git config user.email "[email protected]"
git add .github/dependabot.yml
git commit -S -m "Enable Dependabot updates"
git push

47 changes: 47 additions & 0 deletions dependabot-scheduler.yml
bethbeza marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Automate Dependency Updates

on:
push:
branches:
- "dependabot/*"

jobs:
update-dependencies:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Create a new branch
run: |
git checkout -b update-branch
git push origin update-branch

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT_TOKEN }}
branch: update-branch
title: "Automated Dependency Updates"
body: "Automated dependency updates from GitHub Actions."
base: main
commit-message: "Update dependencies"

- name: Merge Pull Request
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
await github.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
merge_method: "squash"
});
github-token: ${{ secrets.PAT_TOKEN }}
Loading