3636 run : |
3737 ./scripts/release-go.sh
3838 if [ -f "/tmp/modified_apps.txt" ] && [ -s "/tmp/modified_apps.txt" ]; then
39- # Extract branch name from the full ref
4039 BRANCH_NAME=${GITHUB_REF#refs/heads/}
4140 git push origin HEAD:${BRANCH_NAME}
42- # Record the commit hash
4341 echo "commit_hash=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
4442 fi
4543
@@ -52,17 +50,18 @@ jobs:
5250 exit 0
5351 fi
5452
55- # Use jq to read the mapping file and create the matrix
53+ # Read the mapping file and create the matrix
5654 while IFS=, read -r app version; do
57- # Strip 'portal-' prefix if it exists to avoid duplication
58- app_name=${app#portal-}
59- repo=$(jq -r --arg pkg "$app" '.[$pkg] // $pkg' .github/config/repo-names.json)
60- echo "$app_name,$version" >> /tmp/mapped_apps.txt
55+ # Get base name without portal- prefix for repository mapping
56+ base_name=${app#portal-}
57+ # Create the repository name with portal-plugin- prefix
58+ repo="portal-plugin-$base_name"
59+ echo "$app,$version,$repo" >> /tmp/mapped_apps.txt
6160 done < <(paste -d, /tmp/modified_apps.txt /tmp/module_versions.txt)
6261
63- # Create matrix parameter using the mapped names
62+ # Create matrix parameter
6463 matrix=$(cat /tmp/mapped_apps.txt | \
65- jq -R 'split(",") | { app: .[0], version: .[1] }' | \
64+ awk -F, '{print "{\" app\":\"" $1 "\",\" version\":\"" $2 "\",\"repo\":\"" $3 "\"}" }' | \
6665 jq -s '{include: .}' | tr -d '\n')
6766 echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
6867 echo "has_changes=true" >> "$GITHUB_OUTPUT"
7877 uses : peter-evans/repository-dispatch@v3
7978 with :
8079 token : ${{ secrets.PAT_TOKEN }}
81- repository : LumeWeb/portal-plugin- ${{ matrix.app }}
80+ repository : LumeWeb/${{ matrix.repo }}
8281 event-type : update-ui
8382 client-payload : |
8483 {
0 commit comments