diff --git a/generate.yml b/generate.yml index a6ea131..e4e0dbb 100755 --- a/generate.yml +++ b/generate.yml @@ -175,5 +175,7 @@ - source: CONTRIBUTING.md - source: ansible.yml dest: .github/workflows/ansible.yml + - source: galaxy.yml + dest: .github/workflows/galaxy.yml loop_control: label: "{{ item.source }}" diff --git a/templates/ansible.yml.j2 b/templates/ansible.yml.j2 index f907570..5319303 100644 --- a/templates/ansible.yml.j2 +++ b/templates/ansible.yml.j2 @@ -1,13 +1,29 @@ --- {{ ansible_managed | comment }} -name: GitHub Action +name: Ansible Molecule on: - - push + push: + tags_ignore: + - '*' jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + - name: molecule + uses: robertdebock/molecule-action@1.1.1 + with: + image: {% raw %}${{ matrix.image }}{% endraw %} + + entrypoint: /usr/local/bin/molecule + args: lint test: + needs: + - lint runs-on: ubuntu-latest strategy: matrix: @@ -105,12 +121,3 @@ jobs: options: "--parallel all" {% endif %} {% endif %} - release: - needs: - - test - runs-on: ubuntu-latest - steps: - - name: galaxy - uses: robertdebock/galaxy-action@1.0.0 - with: - galaxy_api_key: {% raw %}${{ secrets.galaxy_api_key }}{% endraw %} diff --git a/templates/galaxy.yml.j2 b/templates/galaxy.yml.j2 new file mode 100644 index 0000000..2372228 --- /dev/null +++ b/templates/galaxy.yml.j2 @@ -0,0 +1,18 @@ +--- +{{ ansible_managed | comment }} + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.0 + with: + galaxy_api_key: {% raw %}${{ secrets.galaxy_api_key }}{% endraw %}