From a2267b88a3c0560e64ba059f374a3fa0a318809c Mon Sep 17 00:00:00 2001 From: Mario Finelli Date: Thu, 21 Aug 2025 11:11:48 +0200 Subject: [PATCH 1/4] Switch to ubuntu-latest runner The ubuntu-20.04 runner is no longer available. Switch to latest so that we don't need to keep updating this as time passes, we don't depend on anything for a specific ubuntu version. --- .github/workflows/galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index b32946e..c8cfd87 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -12,7 +12,7 @@ defaults: jobs: release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout git repo uses: actions/checkout@v2 From b2ed7c1dc6062bd1f84b4ebe59584825da77b040 Mon Sep 17 00:00:00 2001 From: Mario Finelli Date: Thu, 21 Aug 2025 11:16:20 +0200 Subject: [PATCH 2/4] Upgrade to latest actions versions We need to use the latest versions because older nodejs runtimes have been deprecated and removed some time ago. As a bonus, the latest version of the setup-python action supports caching pip dependencies out-of-the-box (setting the appropriate cache option) so we can eliminate a few of the manual steps to setup dependency caching. Finally, I also bumped the python version to 3.13 which is what currently ships in the Arch repositories, not that it really matters. --- .github/workflows/galaxy.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index c8cfd87..8f85763 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout git repo - uses: actions/checkout@v2 + uses: actions/checkout@v5 with: path: collections/ansible_collections/kewlfft/aur @@ -26,22 +26,10 @@ jobs: echo ::set-output name=version::$(awk -F '/' '{print substr($3, 2)}' <<< ${GITHUB_REF}) - name: "Set up Python" - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.11" - - - name: Generate cache keys - id: keys - run: | - echo ::set-output name=pip_cache_dir::$(pip cache dir) - # This ensures that the cache is invalidated after a week - echo ::set-output name=date::$(date +%Y_%g) - - - name: Pip Cache - uses: actions/cache@v2 - with: - path: ${{ steps.keys.outputs.pip_cache_dir }} - key: ansible-pip-${{ steps.keys.outputs.date }} + python-version: "3.13" + cache: 'pip' - name: Install pip packages run: | From c58c59c63d1e0290e1739a92c62a07e0771b521e Mon Sep 17 00:00:00 2001 From: Mario Finelli Date: Thu, 21 Aug 2025 11:18:40 +0200 Subject: [PATCH 3/4] Fix output syntax A while ago Github deprecated and removed the ::set-output syntax in favor of appending to the GITHUB_OUTPUT. --- .github/workflows/galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 8f85763..acae195 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -23,7 +23,7 @@ jobs: id: version run: | [ "$(cat galaxy.yml | grep version: | awk '{print $2}')" = $(awk -F '/' '{print substr($3, 2)}' <<< ${GITHUB_REF}) ] || exit 1 - echo ::set-output name=version::$(awk -F '/' '{print substr($3, 2)}' <<< ${GITHUB_REF}) + echo "version=$(awk -F '/' '{print substr($3, 2)}' <<< ${GITHUB_REF})" >> $GITHUB_OUTPUT - name: "Set up Python" uses: actions/setup-python@v5 From 2ef95d29d6fe1bfc52252f4510380e0314ea98a0 Mon Sep 17 00:00:00 2001 From: Mario Finelli Date: Thu, 21 Aug 2025 11:25:50 +0200 Subject: [PATCH 4/4] Remove setup-python action Ansible (and ansible-core) is already installed in the runner images which should be enough to interact with ansible galaxy without needing to install any additional packages. --- .github/workflows/galaxy.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index acae195..07fa1d6 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -25,18 +25,6 @@ jobs: [ "$(cat galaxy.yml | grep version: | awk '{print $2}')" = $(awk -F '/' '{print substr($3, 2)}' <<< ${GITHUB_REF}) ] || exit 1 echo "version=$(awk -F '/' '{print substr($3, 2)}' <<< ${GITHUB_REF})" >> $GITHUB_OUTPUT - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: "3.13" - cache: 'pip' - - - name: Install pip packages - run: | - pip3 install -U pip - pip3 install wheel - pip3 install ansible-core - - name: Deploy collection run: | ansible-galaxy collection build