fixup! Enable Github workflow for basic deployment role testing #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: Test collection roles | |
on: | |
- push | |
- pull_request | |
jobs: | |
check_roles: | |
name: Verify modified roles | |
runs-on: ubuntu-latest | |
outputs: | |
ipaserver: ${{ steps.mod_files.output.ipaserver }} | |
ipareplica: ${{ steps.mod_files.output.ipareplica }} | |
ipaclient: ${{ steps.mod_files.output.ipaclient }} | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 1 | |
- name: Check modified roles | |
id: mod_files | |
shell: bash | |
run: | | |
set -eu | |
git remote add upstream https://github.com/freeipa/ansible-freeipa | |
git fetch --depth 1 upstream master | |
git diff -M --name-only upstream/master \ | |
| grep "^roles" \ | |
| cut -d/ -f2 \ | |
| sort | uniq \ | |
| sed "s/\(.*\)/\1=true/" >> $GITHUB_OUTPUT | |
test_ipaserver: | |
name: Test ipaserver role | |
needs: [check_roles] | |
if: ${{ needs.check_roles.outputs.ipaserver }} == "true" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Test ipaserver | |
run: | | |
echo "testing ipaserver" | |
test_ipareplica: | |
name: Test ipareplica role | |
needs: [check_roles] | |
if: ${{ needs.check_roles.outputs.ipareplica }} == "true" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Test ipareplica | |
run: | | |
echo "testing ipareplica" |