Same issue was faced so when searched in intervet got the solution saying
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
platforms: ${{ steps.platform-matrix.outputs.matrix }}
regions: ${{ steps.region-matrix.outputs.matrix }}
steps:
# Step 1: Retrieve and parse PLATFORMS
- name: Platform Matrix
id: platform-matrix
env:
PLATFORMS: ${{ vars.variablename }}
run: |
# Convert the repository variable to JSON array
MATRIX_JSON=$(jq -nc --arg values "$PLATFORMS" '$values | split(",")')
echo "::set-output name=matrix::$MATRIX_JSON"
Changed the set-output line with below line
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
The code ran perfectly . Same is also communicated here : https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/