From b689e118b02652f1e49ee3c298d548d9da161b87 Mon Sep 17 00:00:00 2001 From: IronicBadger Date: Wed, 27 Apr 2022 17:28:30 -0400 Subject: [PATCH] adds CI --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0d38ef6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release +'on': + push: + tags: + - '*' + +env: + GALAXY_USERNAME: IronicBadger + +jobs: + + release: + name: Release + runs-on: ubuntu-latest + steps: + + - name: Set up Python 3. + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install Ansible. + run: pip3 install ansible-core + + # Galaxy uses CamelCase username but GitHub is all lowercase + # This concatenates the versions together to work with + # And triggers an import on Galaxy + - name: Trigger a new import on Galaxy. + run: >- + ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} + $(echo ${{ env.GALAXY_USERNAME }}) $(echo ${{ github.repository }} | cut -d/ -f2) \ No newline at end of file