release.yml 979 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ---
  2. # This workflow requires a GALAXY_API_KEY secret present in the GitHub
  3. # repository or organization.
  4. #
  5. # See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
  6. # See: https://github.com/ansible/galaxy/issues/46
  7. name: Release
  8. 'on':
  9. push:
  10. tags:
  11. - '*'
  12. defaults:
  13. run:
  14. working-directory: 'geerlingguy.haproxy'
  15. jobs:
  16. release:
  17. name: Release
  18. runs-on: ubuntu-latest
  19. steps:
  20. - name: Check out the codebase.
  21. uses: actions/checkout@v2
  22. with:
  23. path: 'geerlingguy.haproxy'
  24. - name: Set up Python 3.
  25. uses: actions/setup-python@v2
  26. with:
  27. python-version: '3.x'
  28. - name: Install Ansible.
  29. run: pip3 install ansible-core
  30. - name: Trigger a new import on Galaxy.
  31. run: >-
  32. ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
  33. $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)