From c757f9f6de6bebddbc274b26f9282d0199ab0512 Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Wed, 13 Dec 2023 12:47:00 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Henry Mercer --- .github/workflows/pr-checks.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 2cbad44a73..e80dceaa77 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -117,7 +117,7 @@ jobs: check-node-version: if: ${{ github.event.pull_request }} - name: Check node version consistency + name: Check Action Node versions runs-on: ubuntu-latest timeout-minutes: 45 env: @@ -126,24 +126,24 @@ jobs: steps: - uses: actions/checkout@v4 - id: head-version - name: check HEAD node version + name: Verify all Actions use the same Node version run: | NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq) echo "NODE_VERSION: ${NODE_VERSION}" if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then - echo "Error: More than one node version used in actions." + echo "::error::More than one node version used in 'action.yml' files." exit 1 fi echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT - id: checkout-base - name: check out base ref for backport check + name: 'Backport: Check out base ref' if: ${{ startsWith(github.head_ref, 'backport-') }} uses: actions/checkout@v4 with: ref: ${{ env.BASE_REF }} - - name: compare with node version on base ref for backport check + - name: 'Backport: Verify Node versions unchanged' if: steps.checkout-base.outcome == 'success' env: HEAD_VERSION: ${{ steps.head-version.outputs.node_version }} @@ -152,6 +152,6 @@ jobs: echo "HEAD_VERSION: ${HEAD_VERSION}" echo "BASE_VERSION: ${BASE_VERSION}" if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then - echo "Error: Cannot change node version in a backport PR." + echo "::error::Cannot change the Node version of an Action in a backport PR." exit 1 fi