From 1ed5ed1521acd6b3d3189e67528047e7dcbcda5e Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Mon, 2 Dec 2024 11:12:24 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=94=A7=20ci:=20Update=20workflow=20fo?= =?UTF-8?q?r=20PRs=20and=20latest=20Ubuntu=20versions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ac830d..1d8608a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,8 @@ name: Ansible CI on: push: branches: [ master ] + pull_request: + branches: [ master ] workflow_dispatch: @@ -11,11 +13,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro: [ubuntu1804, ubuntu2004, ubuntu2104, debian9, debian10] + distro: [ubuntu2004, ubuntu2204, ubuntu2404, debian9, debian10] steps: - name: Download test shim. - run: | + run: | wget -O ${PWD}/tests/test-ansible-role.sh https://raw.githubusercontent.com/esolitos/gists/master/shell/test-ansible-role.sh chmod +x ${PWD}/tests/test-ansible-role.sh - From ac815135e7aff351c91f8eb32549ec20984c87c4 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Mon, 2 Dec 2024 11:18:00 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=A7=20chore:=20update=20actions=20?= =?UTF-8?q?and=20add=20branch=20restriction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d8608a..93be0ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,16 +15,20 @@ jobs: matrix: distro: [ubuntu2004, ubuntu2204, ubuntu2404, debian9, debian10] steps: + - + uses: actions/checkout@v4 - name: Download test shim. run: | - wget -O ${PWD}/tests/test-ansible-role.sh https://raw.githubusercontent.com/esolitos/gists/master/shell/test-ansible-role.sh - chmod +x ${PWD}/tests/test-ansible-role.sh + wget -O "${PWD}/tests/test-ansible-role.sh" https://raw.githubusercontent.com/esolitos/gists/master/shell/test-ansible-role.sh + chmod +x "${PWD}/tests/test-ansible-role.sh" - name: Run test - run: ${PWD}/tests/test-ansible-role.sh -d ${{ matrix.distro }} + run: ${PWD}/tests/test-ansible-role.sh -d ${{ matrix.distro }} publish: + # Run this job only if the push event is triggered on the default branch + if: github.event_name == 'push' && github.ref == ${{ github.event.repository.default_branch }} needs: - test runs-on: ubuntu-latest @@ -32,7 +36,7 @@ jobs: ansible-galaxy-key: ${{ secrets.ANSIBLE_GALAXY_KEY }} steps: - - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Publish Ansible role to Galaxy uses: robertdebock/galaxy-action@1.1.1 From 839ee60a862c4d49fabb9678bdb78bdf9acd1f02 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Mon, 2 Dec 2024 11:18:43 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=94=84=20workflow:=20Update=20galaxy-?= =?UTF-8?q?action=20to=20v1.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93be0ac..90562b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,6 @@ jobs: uses: actions/checkout@v4 - name: Publish Ansible role to Galaxy - uses: robertdebock/galaxy-action@1.1.1 + uses: robertdebock/galaxy-action@1.2.1 with: galaxy_api_key: ${{ env.ansible-galaxy-key }} From 6a0084e329cf53c72e545b1737b5e830ae77ad84 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Mon, 2 Dec 2024 11:22:36 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20chore(workflow):=20?= =?UTF-8?q?Update=20OS=20matrix=20in=20CI=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90562b6..766229b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro: [ubuntu2004, ubuntu2204, ubuntu2404, debian9, debian10] + distro: [ + ubuntu2004, ubuntu2204, ubuntu2404, + debian10, debian11, debian12, + rockylinux9, + ] steps: - uses: actions/checkout@v4