Skip to content

Instantly share code, notes, and snippets.

@maximveksler
Created December 18, 2022 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximveksler/573f25ec29e6a107a3899f3745fbaeb1 to your computer and use it in GitHub Desktop.
Save maximveksler/573f25ec29e6a107a3899f3745fbaeb1 to your computer and use it in GitHub Desktop.
- name: changesets
id: changed-files
uses: tj-actions/changed-files@v34
with:
separator: ","
dir_names: true
dir_names_max_depth: 2
files: |
apps/**
- id: set-matrix
run: |
echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}"
apps=$(jq -n -c --arg inarr "${{ steps.changed-files.outputs.all_changed_and_modified_files }}" '{ app: $inarr | split(",") }')
cat << EOF >> $GITHUB_OUTPUT
matrix=$apps
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment