From aad77acf42563ef90fcada4f12b5b6c5fcfd2cc0 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:00:42 +0100 Subject: [PATCH 1/7] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20PR=20check=20work?= =?UTF-8?q?flow=20for=20Gitleaks=20and=20lint=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a new pull request (PR) check workflow that includes Gitleaks for security scanning and lint tests to ensure code quality. --- .gitea/workflows/{pr-check-yaml => pr-check.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .gitea/workflows/{pr-check-yaml => pr-check.yaml} (100%) diff --git a/.gitea/workflows/pr-check-yaml b/.gitea/workflows/pr-check.yaml similarity index 100% rename from .gitea/workflows/pr-check-yaml rename to .gitea/workflows/pr-check.yaml -- 2.52.0 From 945717ffbb3765f3d1231443b74a0855bfe8f010 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:02:55 +0100 Subject: [PATCH 2/7] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor?= =?UTF-8?q?=20PR=20check=20workflow=20by=20consolidating=20steps=20and=20r?= =?UTF-8?q?emoving=20redundant=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This refactoring consolidates the steps in the PR check workflow, reducing redundancy and improving efficiency. --- .gitea/workflows/pr-check.yaml | 176 ++++++++++++++++----------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index 2d89269..da0df5c 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -66,99 +66,99 @@ jobs: run: | ansible-lint -handle_failures: - runs-on: ubuntu-latest - needs: [leak_test, lint_test] - if: needs.leak_test.result != 'success' || needs.lint_test.result != 'success' + handle_failures: + runs-on: ubuntu-latest + needs: [leak_test, lint_test] + if: needs.leak_test.result != 'success' || needs.lint_test.result != 'success' - steps: - - name: Comment, label, and close PR - run: | - API="${{ vars.GIT_SERVER_URL }}/api/v1/repos/${{ github.repository }}" - PR="${{ github.event.pull_request.number }}" - TOKEN="${{ secrets.GITEA_TOKEN }}" + steps: + - name: Comment, label, and close PR + run: | + API="${{ vars.GIT_SERVER_URL }}/api/v1/repos/${{ github.repository }}" + PR="${{ github.event.pull_request.number }}" + TOKEN="${{ secrets.GITEA_TOKEN }}" - COMMENT_BODY="❌ CI checks failed.\n\nLeak test: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" + COMMENT_BODY="❌ CI checks failed.\n\nLeak test: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" - # Find existing comment - EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ - "$API/issues/$PR/comments" \ - | jq -r '.[] | select(.body | test("")) | .id') + # Find existing comment + EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ + "$API/issues/$PR/comments" \ + | jq -r '.[] | select(.body | test("")) | .id') - # Update or create comment - if [ -n "$EXISTING_COMMENT_ID" ]; then + # Update or create comment + if [ -n "$EXISTING_COMMENT_ID" ]; then + curl -s -X PATCH \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"body\":\"\n$COMMENT_BODY\"}" \ + "$API/issues/$PR/comments/$EXISTING_COMMENT_ID" + else + curl -s -X POST \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"body\":\"\n$COMMENT_BODY\"}" \ + "$API/issues/$PR/comments" + fi + + # Add label if missing + LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') + if ! echo "$LABELS" | grep -q "^ci-failed$"; then + curl -s -X POST \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d '["ci-failed"]' \ + "$API/issues/$PR/labels" + fi + + # Close PR curl -s -X PATCH \ -H "Authorization: token $TOKEN" \ -H "Content-Type: application/json" \ - -d "{\"body\":\"\n$COMMENT_BODY\"}" \ - "$API/issues/$PR/comments/$EXISTING_COMMENT_ID" - else - curl -s -X POST \ - -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/json" \ - -d "{\"body\":\"\n$COMMENT_BODY\"}" \ - "$API/issues/$PR/comments" - fi - - # Add label if missing - LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') - if ! echo "$LABELS" | grep -q "^ci-failed$"; then - curl -s -X POST \ - -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/json" \ - -d '["ci-failed"]' \ - "$API/issues/$PR/labels" - fi - - # Close PR - curl -s -X PATCH \ - -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/json" \ - -d '{"state":"closed"}' \ - "$API/pulls/$PR" - -handle_success: - runs-on: ubuntu-latest - needs: [leak_test, lint_test] - if: needs.leak_test.result == 'success' && needs.lint_test.result == 'success' - - steps: - - name: Update comment, remove label, reopen PR - run: | - API="${{ vars.GIT_SERVER_URL }}/api/v1/repos/${{ github.repository }}" - PR="${{ github.event.pull_request.number }}" - TOKEN="${{ secrets.GITEA_TOKEN }}" - - COMMENT_BODY="✅ All CI checks passed.\n\nLeak test: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" - - # Find existing comment - EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ - "$API/issues/$PR/comments" \ - | jq -r '.[] | select(.body | test("")) | .id') - - # Update comment if exists - if [ -n "$EXISTING_COMMENT_ID" ]; then - curl -s -X PATCH \ - -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/json" \ - -d "{\"body\":\"\n$COMMENT_BODY\"}" \ - "$API/issues/$PR/comments/$EXISTING_COMMENT_ID" - fi - - # Remove label if exists - LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') - if echo "$LABELS" | grep -q "^ci-failed$"; then - curl -s -X DELETE \ - -H "Authorization: token $TOKEN" \ - "$API/issues/$PR/labels/ci-failed" - fi - - # Reopen PR if closed - PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state') - if [ "$PR_STATE" = "closed" ]; then - curl -s -X PATCH \ - -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/json" \ - -d '{"state":"open"}' \ + -d '{"state":"closed"}' \ "$API/pulls/$PR" - fi + + handle_success: + runs-on: ubuntu-latest + needs: [leak_test, lint_test] + if: needs.leak_test.result == 'success' && needs.lint_test.result == 'success' + + steps: + - name: Update comment, remove label, reopen PR + run: | + API="${{ vars.GIT_SERVER_URL }}/api/v1/repos/${{ github.repository }}" + PR="${{ github.event.pull_request.number }}" + TOKEN="${{ secrets.GITEA_TOKEN }}" + + COMMENT_BODY="✅ All CI checks passed.\n\nLeak test: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" + + # Find existing comment + EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ + "$API/issues/$PR/comments" \ + | jq -r '.[] | select(.body | test("")) | .id') + + # Update comment if exists + if [ -n "$EXISTING_COMMENT_ID" ]; then + curl -s -X PATCH \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"body\":\"\n$COMMENT_BODY\"}" \ + "$API/issues/$PR/comments/$EXISTING_COMMENT_ID" + fi + + # Remove label if exists + LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') + if echo "$LABELS" | grep -q "^ci-failed$"; then + curl -s -X DELETE \ + -H "Authorization: token $TOKEN" \ + "$API/issues/$PR/labels/ci-failed" + fi + + # Reopen PR if closed + PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state') + if [ "$PR_STATE" = "closed" ]; then + curl -s -X PATCH \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"state":"open"}' \ + "$API/pulls/$PR" + fi -- 2.52.0 From 1733801fe5e42c6c41ce8fe3eaa915970d733b95 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:08:56 +0100 Subject: [PATCH 3/7] =?UTF-8?q?fix=20=F0=9F=90=9B:=20Fix=20typo=20in=20PR?= =?UTF-8?q?=20check=20workflow=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrected a minor spelling error in the comments of the pull request check workflow to improve readability and clarity. --- .gitea/workflows/pr-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index da0df5c..32fffbc 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -78,7 +78,7 @@ jobs: PR="${{ github.event.pull_request.number }}" TOKEN="${{ secrets.GITEA_TOKEN }}" - COMMENT_BODY="❌ CI checks failed.\n\nLeak test: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" + COMMENT_BODY="❌ CI checks failed.\n\nLeak: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" # Find existing comment EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ @@ -129,7 +129,7 @@ jobs: PR="${{ github.event.pull_request.number }}" TOKEN="${{ secrets.GITEA_TOKEN }}" - COMMENT_BODY="✅ All CI checks passed.\n\nLeak test: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" + COMMENT_BODY="✅ CI checks passed.\n\nLeaks: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" # Find existing comment EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ -- 2.52.0 From a0138b1beae2bf63a6b783c4c66e29fe2fae3137 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:09:51 +0100 Subject: [PATCH 4/7] =?UTF-8?q?fix=20=F0=9F=90=9B:=20Fix=20typo=20in=20PR?= =?UTF-8?q?=20check=20comment=20body?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrected a minor spelling error in the comment body of the pull request check to improve readability and accuracy. --- .gitea/workflows/pr-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index 32fffbc..eb42ff4 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -129,7 +129,7 @@ jobs: PR="${{ github.event.pull_request.number }}" TOKEN="${{ secrets.GITEA_TOKEN }}" - COMMENT_BODY="✅ CI checks passed.\n\nLeaks: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" + COMMENT_BODY="✅ CI checks pass.\n\nLeaks: ${{ needs.leak_test.result }}\nLint: ${{ needs.lint_test.result }}" # Find existing comment EXISTING_COMMENT_ID=$(curl -s -H "Authorization: token $TOKEN" \ -- 2.52.0 From dfda760d2c18471a28445a8b313580cf1f4c4de2 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:22:54 +0100 Subject: [PATCH 5/7] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor?= =?UTF-8?q?=20condition=20for=20`handle=5Ffailures`=20to=20run=20regardles?= =?UTF-8?q?s=20of=20previous=20job=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This refactoring ensures that the `handle_failures` function is executed irrespective of the outcomes of previous jobs, improving the robustness and reliability of the system. --- .gitea/workflows/pr-check.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index eb42ff4..bcf3874 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -69,7 +69,9 @@ jobs: handle_failures: runs-on: ubuntu-latest needs: [leak_test, lint_test] - if: needs.leak_test.result != 'success' || needs.lint_test.result != 'success' + if: "${{ always() && ( + needs.leak_test.result != 'success' || + needs.lint_test.result != 'success' ) }}" steps: - name: Comment, label, and close PR -- 2.52.0 From eb5eaf78872ca3e2afef8b73df7e9ae92c255508 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:38:18 +0100 Subject: [PATCH 6/7] =?UTF-8?q?docs=20=F0=9F=93=9D:=20Update=20README=20ti?= =?UTF-8?q?tle=20and=20compatibility=20matrix=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the README title to be more descriptive and restructured the compatibility matrix for better readability. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2bfd15b..4279cc6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ansible_role_proxmox_provision +# README ansible_role_proxmox_provision > A reusable Ansible role template for for Proxmox VE > with a focus on provisioning and managing. @@ -18,7 +18,7 @@ ## 📊 Compatibility Matrix -| Feature | VE 7 | VE 8 | VE 9 | +| Feature \ Proxmox Version| 7 | 8 | 9 | | ------------------------ | ---- | ---- | ---- | | No-subscription repo | ✅ | ✅ | ✅ | | Enterprise repo disabled | ✅ | ✅ | ✅ | -- 2.52.0 From fc3b5e85074cffe4abb0a262d4050d12ac24aa4c Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 09:40:00 +0100 Subject: [PATCH 7/7] =?UTF-8?q?fix=20=F0=9F=90=9B:=20Fix=20PR=20check=20jo?= =?UTF-8?q?b=20condition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit addresses an issue where the PR check job was not running as expected. The condition for triggering the job has been corrected to ensure it runs properly under all circumstances. --- .gitea/workflows/pr-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index bcf3874..63c652d 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest needs: [leak_test, lint_test] if: "${{ always() && ( - needs.leak_test.result != 'success' || + needs.leak_test.result != 'success' || needs.lint_test.result != 'success' ) }}" steps: -- 2.52.0