From adf5ffecf7a21f51985aa93bb11b87aa5cabcb8e Mon Sep 17 00:00:00 2001 From: ilia Date: Wed, 17 Dec 2025 22:59:13 -0500 Subject: [PATCH] Enhance CI workflow and update Timeshift documentation - Update CI workflow to skip push events for non-master branches, ensuring only relevant events trigger jobs. - Improve Timeshift documentation for clarity by splitting long sentences into shorter ones for better readability. - Maintain consistent formatting in development role tasks by removing unnecessary conflict markers. --- .gitea/workflows/ci.yml | 5 +++++ docs/guides/timeshift.md | 6 ++++-- roles/development/tasks/main.yml | 4 ---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a154233..cf32634 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,10 +5,13 @@ on: push: branches: [master] pull_request: + types: [opened, synchronize, reopened] jobs: lint-and-test: runs-on: ubuntu-latest + # Skip push events for non-master branches (they'll be covered by PR events) + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' container: image: node:20-bullseye steps: @@ -27,6 +30,8 @@ jobs: ansible-validation: runs-on: ubuntu-latest + # Skip push events for non-master branches (they'll be covered by PR events) + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' container: image: ubuntu:22.04 steps: diff --git a/docs/guides/timeshift.md b/docs/guides/timeshift.md index a61bdfc..a1df78b 100644 --- a/docs/guides/timeshift.md +++ b/docs/guides/timeshift.md @@ -2,7 +2,8 @@ ## Overview -Timeshift is a system restore utility that creates snapshots of your system before Ansible playbook execution. This allows you to easily rollback if something goes wrong during configuration changes. +Timeshift is a system restore utility that creates snapshots of your system before Ansible playbook execution. +This allows you to easily rollback if something goes wrong during configuration changes. ## How It Works @@ -190,7 +191,8 @@ timeshift_keep_weekly: 2 # Reduce from 4 ## Integration with Ansible -The Timeshift role is automatically included in the development playbook and runs first to create snapshots before any changes are made. This ensures you always have a restore point. +The Timeshift role is automatically included in the development playbook and runs first to create snapshots before any changes are made. +This ensures you always have a restore point. ```yaml # playbooks/development.yml diff --git a/roles/development/tasks/main.yml b/roles/development/tasks/main.yml index 14dac73..4492f96 100644 --- a/roles/development/tasks/main.yml +++ b/roles/development/tasks/main.yml @@ -46,11 +46,7 @@ fi register: nodesource_key_check failed_when: false -<<<<<<< HEAD - changed_when: false -======= changed_when: false # noqa command-instead-of-module ->>>>>>> 5d3b339 (Fix: Resolve linting errors and improve firewall configuration) when: node_version_check.rc != 0 or not node_version_check.stdout.startswith('v22') - name: Remove incorrect NodeSource repository