Skip to content

Commit

Permalink
Notification + diff
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Oct 17, 2024
1 parent b924110 commit 0980197
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 39 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,24 @@ jobs:
docker push $NEW_TAG
done
- name: Build and push
- name: Build for diff and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: ${{ github.ref == 'refs/heads/master' }}
push: false
load: true
file: ${{ matrix.image }}
tags: ${{ join(matrix.tags) }}
platforms: ${{ join(matrix.platforms) }}
platforms: "linux/amd64"

# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: ${{ github.ref == 'refs/heads/master' }}
# file: ${{ matrix.image }}
# tags: ${{ join(matrix.tags) }}
# platforms: ${{ join(matrix.platforms) }}

- name: Current image report
run: |
Expand All @@ -152,6 +161,7 @@ jobs:
echo "EOF" >> $GITHUB_ENV
- name: Send Slack Notification
if: ${{ github.ref == 'refs/heads/master' }}
uses: slackapi/[email protected]
with:
payload: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cleanup-old-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:

- name: Send Slack Notification
uses: slackapi/[email protected]
if: ${{ github.ref == 'refs/heads/master' }}
with:
payload: |
{
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Trivy security scan

on:
# schedule:
# - cron: '0 10 * * *'
push:
branches-ignore:
- master
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,37 @@ jobs:
exit 1 # This will fail the workflow
fi
- name: Send Slack Notification
if: github.event.schedule == '0 10 * * *'
uses: slackapi/[email protected]
with:
payload: |
{
"text": "Trufflehog scan completed for ${{ github.repository }}",
"attachments": [
{
"pretext": "Trufflehog Scan Results",
"color": "${{ steps.trufflehog_scan.outcome == 'success' && 'good' || 'danger' }}",
"fields": [
{
"title": "Outcome",
"value": "${{ steps.trufflehog_scan.outcome == 'success' && 'No secrets found' || 'Secrets were found' }}",
"short": true
},
{
"title": "Branch",
"value": "${{ github.ref }}",
"short": true
},
{
"title": "Commit",
"value": "${{ github.sha }}",
"short": true
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
# - name: Send Slack Notification
# if: github.event.schedule == '0 10 * * *'
# uses: slackapi/[email protected]
# with:
# payload: |
# {
# "text": "Trufflehog scan completed for ${{ github.repository }}",
# "attachments": [
# {
# "pretext": "Trufflehog Scan Results",
# "color": "${{ steps.trufflehog_scan.outcome == 'success' && 'good' || 'danger' }}",
# "fields": [
# {
# "title": "Outcome",
# "value": "${{ steps.trufflehog_scan.outcome == 'success' && 'No secrets found' || 'Secrets were found' }}",
# "short": true
# },
# {
# "title": "Branch",
# "value": "${{ github.ref }}",
# "short": true
# },
# {
# "title": "Commit",
# "value": "${{ github.sha }}",
# "short": true
# }
# ]
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit 0980197

Please sign in to comment.