Add LDAP Group Sync #121
This file contains hidden or 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: Publish Ansible Collection | |
| on: | |
| push: | |
| branches: | |
| - 'develop' | |
| paths: | |
| - 'plugins/**' | |
| - 'roles/**' | |
| - 'tests/**' | |
| - 'meta/**' | |
| - 'galaxy.yml' | |
| - '.github/workflows/publish-collection.yml' | |
| jobs: | |
| sanity: | |
| strategy: | |
| matrix: | |
| ansible: | |
| - stable-2.14 | |
| os: | |
| - ubuntu-22.04 | |
| python-version: | |
| - "3.7" | |
| - "3.8" | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '${{ matrix.python-version }}' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install passlib | |
| - name: Perform sanity testing | |
| uses: ansible-community/ansible-test-gh-action@release/v1.15 | |
| with: | |
| ansible-core-version: ${{ matrix.ansible }} | |
| target-python-version: ${{ matrix.python-version }} | |
| testing-type: sanity | |
| pull-request-change-detection: true | |
| pre-test-cmd: pip install passlib | |
| publish: | |
| needs: sanity | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/develop' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo add-apt-repository -y ppa:rmescandon/yq | |
| sudo apt-get update -y | |
| sudo apt-get install -y jq yq | |
| python -m pip install --upgrade pip | |
| pip install ansible passlib | |
| - name: Create Collection Archive | |
| run: | | |
| ansible-galaxy collection build | |
| - name: Publish Collection to Galaxy | |
| run: | | |
| MODULE_VERSION=$(yq e '.version' galaxy.yml) | |
| MODULE_NAMESPACE=$(yq e '.namespace' galaxy.yml) | |
| MODULE_NAME=$(yq e '.name' galaxy.yml) | |
| echo "Module : [Namespace : $MODULE_NAMESPACE, Name : $MODULE_NAME, Version: $MODULE_VERSION]" | |
| ansible-galaxy collection publish $MODULE_NAMESPACE-$MODULE_NAME-$MODULE_VERSION.tar.gz --api-key ${{ secrets.ANSIBLE_GALAXY_API_KEY}} |