Create main.yml #7
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: Container Security Scan | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
container_scan: | |
name: Container Security Scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker | |
uses: docker/setup-action@v2 | |
- name: Install jq | |
run: sudo apt-get update && sudo apt-get install -y jq | |
- name: Run container security scan | |
run: | | |
ORG="bahmni" | |
bash script/image-scan.sh "$ORG" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit and push changes | |
id: auto-commit-action | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "[Bahmni Infra] | Update Translation Resources" | |
branch: ${{ github.ref }} | |
repository: . | |
commit_user_name: Bahmni Infra | |
commit_user_email: [email protected] | |
commit_author: Bahmni Infra <[email protected]> | |
- name: Check for changes | |
run: | | |
if [[ steps.auto-commit-action.outputs.changes_detected == 'true' ]]; then | |
echo "Changes Detected. Translation Resources Updated." | |
else | |
echo "No Changes Detected." | |
fi |