From 454649d90b7e8402e220ec7d9bce2abec91d4cbd Mon Sep 17 00:00:00 2001 From: "Larry Smith Jr." Date: Wed, 8 Apr 2026 09:59:45 -0400 Subject: [PATCH] ci: fix galaxy publish to trigger only on release, simplify deps --- .github/workflows/release-galaxy.yml | 34 ++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-galaxy.yml b/.github/workflows/release-galaxy.yml index 06e5471..3c5d078 100644 --- a/.github/workflows/release-galaxy.yml +++ b/.github/workflows/release-galaxy.yml @@ -1,10 +1,6 @@ ---- name: Ansible Galaxy + on: - push: - branches: - - main - - master release: types: - published @@ -14,21 +10,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Set up Python 3.9 + + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.9' - - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Install dependencies + python-version: '3.11' + + - name: Install Ansible run: | python -m pip install --upgrade pip - pip install -r requirements.txt -r requirements-dev.txt - - 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) + pip install ansible-core + + - name: Trigger a new import on Galaxy + run: >- + ansible-galaxy role import + --api-key ${{ secrets.GALAXY_API_KEY }} + ${{ github.repository_owner }} + ${{ github.event.repository.name }} +