Scan Images In Bahmni Namespace #18
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
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]> |