From 6de82abcbdd5c93c0f3d4cf58c9295141ba781bb Mon Sep 17 00:00:00 2001 From: Marcin Bojko Date: Sat, 23 Nov 2024 12:45:23 +0100 Subject: [PATCH] fix: Update DEFAULT_BRANCH and VALIDATE_ALL_CODEBASE in lint workflow The commit fixes the lint workflow by updating the DEFAULT_BRANCH to use github.ref_name and setting VALIDATE_ALL_CODEBASE based on github.event_name for non-pull_request events. Also, minor formatting adjustment in kvm_generic.sh. --- .github/workflows/01_lint_me.yml | 4 ++-- kvm_generic.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/01_lint_me.yml b/.github/workflows/01_lint_me.yml index beb27d5..49aeb32 100644 --- a/.github/workflows/01_lint_me.yml +++ b/.github/workflows/01_lint_me.yml @@ -26,7 +26,7 @@ jobs: uses: github/super-linter/@main env: LINTER_RULES_PATH: / - DEFAULT_BRANCH: main + DEFAULT_BRANCH: ${{ github.ref_name }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VALIDATE_ALL_CODEBASE: true + VALIDATE_ALL_CODEBASE: ${{ github.event_name != 'pull_request' }} VALIDATE_YAML: true diff --git a/kvm_generic.sh b/kvm_generic.sh index 263fc46..ffa2286 100755 --- a/kvm_generic.sh +++ b/kvm_generic.sh @@ -165,5 +165,5 @@ time_diff_seconds=$(((end_time - start_time) / 1000000000)) hours=$((time_diff_seconds / 3600)) minutes=$(((time_diff_seconds % 3600) / 60)) seconds=$((time_diff_seconds % 60)) - echo -e "${GREEN}Packer build took: ${hours} hours, ${minutes} minutes, and ${seconds} seconds.${NC}" +