From 393cb69ed0f80610d2c672d23f80b0c152aaf1d2 Mon Sep 17 00:00:00 2001 From: Marcelo Vargas Date: Thu, 20 Jul 2023 16:38:22 -0700 Subject: [PATCH] ignore master branch --- .github/workflows/delete-old-branches.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/delete-old-branches.yml b/.github/workflows/delete-old-branches.yml index 649cafaa..f9649a8f 100644 --- a/.github/workflows/delete-old-branches.yml +++ b/.github/workflows/delete-old-branches.yml @@ -25,6 +25,11 @@ jobs: # Extract the branch name from the full reference (e.g., "origin/branch-name") branch_name=${branch#"origin/"} + # Skip the 'master' branch + if [ "$branch_name" = "master" ]; then + continue + fi + # Get the last commit date of the branch in Unix timestamp format last_commit_date=$(git show -s --format=%ct "origin/$branch_name")