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

Fix slack notification #24

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/nightly-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Nightly Scan

on:
workflow_dispatch:

env:
KO_REGISTRY: ghcr.io/nirmata/nightly-kube-bench-adapter

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21.5

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install KO
uses: ko-build/[email protected]

- run: make ko-build IMAGE_TAG=latest

- name: image scanning
uses: nirmata/reusable-workflows/.github/actions/image-scanning@main
with:
pcc_url: ${{ secrets.PCC_URL }}
pcc_user: ${{ secrets.PCC_USER }}
pcc_pass: ${{ secrets.PCC_PASS }}
image_name: ${{env.KO_REGISTRY}}

- name: Notify failure status
if: always() && (job.status == 'failure')
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 #v2.3.2
env:
SLACK_CHANNEL: cve-nightly-scan-alerts
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/25/25231.png
SLACK_MESSAGE: Repository - ${{github.repository}} - main Environment - nightly-scan
SLACK_TITLE: CVE discovered
SLACK_USERNAME: Github Actions
SLACK_WEBHOOK: ${{ secrets.NIGHTLY_SCAN_WEBHOOK }}
Loading