-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b924110
commit 0980197
Showing
4 changed files
with
48 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -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: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ jobs: | |
|
||
- name: Send Slack Notification | ||
uses: slackapi/[email protected] | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
with: | ||
payload: | | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |