diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7968eb3..b245b40 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,8 +12,17 @@ jobs: - name: 'Checkout the codebase' uses: actions/checkout@v3 - - name: 'Publish to Ansible Galaxy' - uses: robertdebock/galaxy-action@1.2.0 + - name: 'Set up Python 3.' + uses: actions/setup-python@v2 with: - galaxy_api_key: ${{ secrets.GALAXY_API_KEY }} - git_branch: main + python-version: '3.x' + + - name: 'Install ansible-core package.' + run: pip3 install ansible-core + + - name: 'Publish the role to the Ansible Galaxy' + run: >- + ansible-galaxy role import \ + --api-key ${{ secrets.GALAXY_API_KEY }} \ + --role-name microsoft_repository \ + $(echo $GITHUB_REPOSITORY | cut -d/ -f1) $(echo $GITHUB_REPOSITORY | cut -d/ -f2)