anusha94 has triggered Scan Action 🚀 #2
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: Ansible Playbook Scan Pipeline Demo | |
run-name: ${{ github.actor }} has triggered Scan Action 🚀 | |
on: | |
pull_request: | |
branches: | |
- "main" | |
push: | |
branches: | |
- "main" | |
env: | |
NIRMATA_TOKEN: ${{ secrets.NIRMATA_TOKEN }} | |
NIRMATA_URL: ${{ secrets.NIRMATA_URL }} | |
jobs: | |
NCTL-Scan-Ansible: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- name: Check out main repository code | |
uses: actions/checkout@v4 | |
- name: nctl-scan-installer | |
uses: nirmata/[email protected] | |
- name: Check nctl version | |
run: | | |
nctl version | |
- name: nctl login | |
run: nctl login --url $NIRMATA_URL --userid [email protected] --token $NIRMATA_TOKEN | |
- name: NCTL Scan Repository for Ansible playbooks | |
run: | | |
nctl scan json -r playbooks/vm-json.json --policies policies/ --publish | |
- run: echo "🍏 This job's status is ${{ job.status }}." |