Skip to content

Commit

Permalink
chore: separate concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Nov 8, 2024
1 parent 8e5691c commit 7a2fe26
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7a2fe26

Please sign in to comment.