infra-setup #2
|
@ -39,14 +39,10 @@ jobs:
|
||||||
|
|
||||||
- name: Get changed playbooks
|
- name: Get changed playbooks
|
||||||
id: changed-playbooks
|
id: changed-playbooks
|
||||||
uses: tj-actions/changed-files@v38
|
run: |
|
||||||
with:
|
git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD | base64 | xargs -I {} echo "files_b64={}" >> "$GITHUB_OUTPUT"
|
||||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
|
||||||
files: infra/**-playbook.yaml
|
|
||||||
|
|
||||||
- name: Check modified playbooks
|
- name: Check modified playbooks
|
||||||
run: |
|
run: |
|
||||||
echo "Got changed files: '${{ steps.changed-playbooks.outputs.all_changed_files }}'"
|
export FILES="${{ steps.changed-playbooks.outputs.files_b64 }}"
|
||||||
for file in ${{ steps.changed-playbooks.outputs.all_changed_files }}; do
|
echo "Got changed files: '$(echo $FILES | base64 -d | xargs echo)'"
|
||||||
ansible --inventory ./inventory --check "$file"
|
|
||||||
done
|
|
||||||
|
|
Loading…
Reference in New Issue