From b2ddf5375785b245f78ad876a9aee5fd435630d6 Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Fri, 15 Nov 2024 15:30:09 -0500 Subject: [PATCH] DIGITAL-175: Explicitly set branch name instead of trying to find it out manually. --- .github/workflows/run-validation.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-validation.yml b/.github/workflows/run-validation.yml index 54951fe..c078242 100644 --- a/.github/workflows/run-validation.yml +++ b/.github/workflows/run-validation.yml @@ -14,6 +14,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -52,7 +57,7 @@ jobs: status3=0 # Run all commands and capture their exit statuses - vendor/bin/robo validate:branch-name || status1=$? || status1=0 + vendor/bin/robo validate:branch-name ${{ steps.extract_branch.outputs.branch }} || status1=$? || status1=0 vendor/bin/robo validate:composer-lock || status3=$? || status3=0 vendor/bin/robo validate:coding-standards || status2=$? || status2=0