Revert "Build only spec files that were changed in the push"

This reverts commit 7cbd8b6f3d.
This commit is contained in:
Anders da Silva Rytter Hansen 2026-05-27 15:08:04 -03:00
commit db62c6ca62

View file

@ -7,32 +7,15 @@ on:
workflow_dispatch:
jobs:
changed:
runs-on: almalinux-10
outputs:
matrix: ${{ steps.set.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine changed specs
id: set
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
python3 -c "import json; print(json.dumps({'spec': ['sonic-interface-libraries.spec','sonic-win.spec','sonic-workspace.spec']}))"
else
CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.spec$' || true)
python3 -c "import json, sys; print(json.dumps({'spec': sys.argv[1].split()}))" "$CHANGED"
fi >> "$GITHUB_OUTPUT"
build:
needs: changed
runs-on: almalinux-10
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.changed.outputs.matrix) }}
matrix:
spec:
- sonic-interface-libraries.spec
- sonic-win.spec
- sonic-workspace.spec
steps:
- name: Checkout