From 7a2fe265c0bb3ee6d69312bd35234f98b72301d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 8 Nov 2024 21:08:46 +0100 Subject: [PATCH] chore: separate concerns --- .github/workflows/ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e37c33c97..4b17a14211 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest outputs: modules: ${{ steps.set-modified-modules.outputs.modules }} - modulesCount: ${{ steps.set-modified-modules.outputs.modulesCount }} + modulesCount: ${{ steps.set-modified-modules-count.outputs.modulesCount }} steps: - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 @@ -30,12 +30,16 @@ jobs: name: Set all modified modules env: ALL_CHANGED_FILES: "${{ steps.changed-files.outputs.all_changed_files }}" - run: | - echo "modules=$(./scripts/changed-modules.sh)" >> $GITHUB_OUTPUT - echo "modulesCount=$(echo $modules | jq '. | length')" >> GITHUB_OUTPUT + run: echo "modules=$(./scripts/changed-modules.sh)" >> $GITHUB_OUTPUT + + - id: set-modified-modules-count + name: Set all modified modules count + run: echo "modulesCount=$(echo ${{ toJSON(steps.set-modified-modules.outputs.modules) }} | jq '. | length')" >> GITHUB_OUTPUT - name: Print out the modules to be used - run: echo "${{ steps.set-modified-modules.outputs.modules }}" + run: | + echo "${{ steps.set-modified-modules-count.outputs.modulesCount }} modules in the build" + echo "${{ steps.set-modified-modules.outputs.modules }}" lint: # only run if there are modules to lint