From e18991e293ed7479f9f4580d6d19003f9c74c10f Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Tue, 27 Feb 2024 18:34:30 -0600 Subject: [PATCH] Refactor release workflow with makefile target --- .github/workflows/release.yml | 28 ++++++++++++++++++---------- .talismanrc | 2 ++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c14fbf2..5f353b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ # See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy # See: https://github.com/ansible/galaxy/issues/46 +--- name: release on: @@ -17,24 +18,31 @@ defaults: working-directory: 'nephelaiio.growfs' jobs: - release: name: release runs-on: ubuntu-latest steps: - - name: Check out the codebase. - uses: actions/checkout@v2 + - name: Check out the codebase + uses: actions/checkout@v3 with: path: 'nephelaiio.growfs' - - name: Set up Python 3. - uses: actions/setup-python@v2 + - name: set up Python 3 + uses: actions/setup-python@v4 with: python-version: '3.x' - - name: Install Ansible. - run: pip3 install ansible-base + - name: Update ubuntu repositories + run: sudo apt-get update + + - name: Install make + run: sudo apt-get install -y make + + - name: Install dependencies + run: make install - - name: Trigger a new import on Galaxy. - run: >- - ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo $GITHUB_REPOSITORY | cut -d/ -f1) $(echo $GITHUB_REPOSITORY | cut -d/ -f2) + - name: Trigger a new import on galaxy + run: make publish + env: + GALAXY_API_KEY: "${{ secrets.GALAXY_API_KEY }}" + GITHUB_REPOSITORY: "${{ github.repository }}" diff --git a/.talismanrc b/.talismanrc index 82e00e3..f315c9b 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,4 +1,6 @@ fileignoreconfig: +- filename: .github/workflows/release.yml + ignore_detectors: [filecontent] - filename: pyproject.toml ignore_detectors: [filecontent] - filename: poetry.lock