Revert "Build only spec files that were changed in the push"
This reverts commit 7cbd8b6f3d.
This commit is contained in:
parent
f11a33cad0
commit
db62c6ca62
1 changed files with 5 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue