Skip to content

Commit

Permalink
Cancel previous jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Oct 18, 2024
1 parent a35a8c8 commit e19d7ab
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 44 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: CI
name: CI/CD

on: push

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -152,8 +156,7 @@ jobs:
echo "EOF" >> $GITHUB_ENV
- name: Send Slack Notification
if: ${{ env.DIFF_OUTPUT != '' }}
# if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }}
if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }}
uses: slackapi/[email protected]
with:
payload: |
Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Trivy security scan
name: Trivy secrets scan

on:
push:
branches-ignore:
- master

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
trivy-secrets-scan:
runs-on: ubuntu-latest
Expand All @@ -16,4 +20,4 @@ jobs:
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
trivy-config: .trivy/trivy.yaml
trivy-config: .trivy/trivy.yaml
43 changes: 5 additions & 38 deletions .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Trufflehog security scan
name: Trufflehog secrets scan

on:
# schedule:
# - cron: '0 10 * * *'
push:
branches-ignore:
- master

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
trufflehog-vulnerability-detection:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,38 +37,3 @@ jobs:
echo "Secrets were found by Trufflehog!"
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches-ignore:
- master

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-scan-images-for-vulnerabilities:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -92,4 +96,4 @@ jobs:

- name: Show scan result
run: |
echo "Trivy scan completed for spryker/php:${{ matrix.tags }}"
echo "Trivy scan completed for spryker/php:${{ matrix.tags }}"

0 comments on commit e19d7ab

Please sign in to comment.