Disable ansible-galaxy import

Repository structure not compatible (galaxy expects the role to be at
the root of the repository, not in a subfolder).
This commit is contained in:
Fabian Koller 2021-01-09 10:46:38 +01:00
parent 586db3bc5e
commit 9cd6235947
No known key found for this signature in database
GPG Key ID: 4EFE4C946404B82A

View File

@ -31,27 +31,29 @@ jobs:
cd ansible cd ansible
molecule test molecule test
working-directory: "${{ github.repository }}" working-directory: "${{ github.repository }}"
# https://galaxy.ansible.com/docs/contributing/importing.html # # https://galaxy.ansible.com/docs/contributing/importing.html
release: # release:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: # needs:
- test # - test
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context # # https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context
if: contains(github.ref, 'refs/tags/') # if: contains(github.ref, 'refs/tags/')
steps: # steps:
- name: Check out the codebase # - name: Check out the codebase
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
path: "${{ github.repository }}" # path: "${{ github.repository }}"
- name: Set up Python # - name: Set up Python
uses: actions/setup-python@v2 # uses: actions/setup-python@v2
- name: Install dependencies # - name: Install dependencies
run: | # run: |
python3 -m pip install --upgrade ansible-base # python3 -m pip install --upgrade ansible-base
ansible --version # ansible --version
python --version # python --version
- name: Trigger a new import on Galaxy # - name: Trigger a new import on Galaxy
run: | # # TODO Check if source if pulled from cwd or imported from github
cd ansible # # https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/galaxy.py
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) # run: |
working-directory: "${{ github.repository }}" # cd ansible
# ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
# working-directory: "${{ github.repository }}"