forked from Bahmni/bahmni-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.41 KB
/
scan_images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Scan Images In Bahmni Namespace
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
scan-images:
name: Scan Images In Bahmni Namespace
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout security-private repo
uses: actions/checkout@v4
with:
repository: Bahmni/security-reports
token: ${{ secrets.BAHMNI_PAT }}
- name: Get current date
id: date
run: |
date=$(date +'%d-%m-%Y')
echo "date=$date" >> $GITHUB_OUTPUT
- name: Get Scanner Script and Template File
run: |
curl -o image-scanner.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/image-scanner.sh
chmod +x image-scanner.sh
curl -o html.tpl https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/html.tpl
- name: Scan Images In Bahmni Namespace
run: |
./image-scanner.sh bahmni
- name: Commit and push changes
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[Bahmni Infra] | Add. Image Scan Report ${{ steps.date.outputs.date }}"
file_pattern: '*.html *.txt'
repository: .
commit_user_name: Bahmni Infra
commit_user_email: [email protected]
commit_author: bahmni-infra <[email protected]>