Skip to content

Commit

Permalink
Try 15
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-quintero committed Sep 11, 2024
1 parent a6cf8e3 commit f5775dd
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
APPS: ""
APP_NAMES: ""
FILTERS: ""
AUTOMATIC_APP_NAMES: false
permissions:
id-token: write
contents: write
Expand Down Expand Up @@ -80,31 +81,35 @@ jobs:
exit 0
fi
export AUTOMATIC_APP_NAMES=true
echo "AUTOMATIC_APP_NAMES=${AUTOMATIC_APP_NAMES}" >> $GITHUB_ENV
APP_NAMES_ARRAY=$(yq '.apps[].name' workflow-configuration.yml)
APP_NAMES=$(echo ${APP_NAMES_ARRAY[@]} | tr '\n' ' ')
echo "APP_NAMES=${APP_NAMES}" >> $GITHUB_ENV
export FILTERS=""
FILTERS_FILE="../.github/filters.yml"
touch $FILTERS_FILE
for app in ${APP_NAMES[@]}; do
FILTERS="${FILTERS}${app}:\n - '${app}/**'\n"
echo "${app}:" >> $FILTERS_FILE
echo " - '${app}/**'" >> $FILTERS_FILE
done
echo "FILTERS=${FILTERS}" >> $GITHUB_ENV
echo $FILTERS > ../.github/filters.yml
echo "Successfully created filters and wrote them to .github/filters.yml"
cat ../.github/filters.yml
echo "Successfully created filters and wrote them to $FILTERS_FILE"
cat $FILTERS_FILE"
working-directory: ./community-apps/.nextmv

- name: Filter changed directories
id: filter
if: ${{ env.FILTERS != '' }}
if: ${{ env.AUTOMATIC_APP_NAMES == 'true' }}
uses: dorny/paths-filter@v3
with:
filters: .github/filters.yml
working-directory: ./community-apps

- name: Create comma-separated string of changed paths
id: changed_paths
if: ${{ env.FILTERS != '' }}
if: ${{ env.AUTOMATIC_APP_NAMES == 'true' }}
run: |
export APPS=""
OUTPUTS=$(echo '${{ toJson(steps.filter.outputs) }}' | jq .)
Expand Down

0 comments on commit f5775dd

Please sign in to comment.