Refactor workflow file paths and update branch restrictions
This commit is contained in:
@@ -5,7 +5,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "ansible/playbook_*.yml"
|
||||
- ansible/playbook_*.yml
|
||||
- .github/workflows/ansible-apply-playbook.yml
|
||||
|
||||
jobs:
|
||||
ansible-apply:
|
||||
@@ -18,6 +19,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup environment
|
||||
id: setup_env
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Setup Ansible environment
|
||||
@@ -32,7 +34,7 @@ jobs:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
CHANGED_FILES: ${{ steps.get_changed_files.outputs.CHANGED_FILES }}
|
||||
CHANGED_FILES: ${{ steps.setup_env.outputs.CHANGED_FILES }}
|
||||
run: |
|
||||
cd ansible
|
||||
for PLAYBOOK in $(echo $CHANGED_FILES | grep -oP 'playbook_\K\w+'); do
|
||||
|
||||
Reference in New Issue
Block a user