Newer
Older
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
# Filter targets based on changed files
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/filters.yml
if: ${{ needs.changed.outputs.targets != '[]' && needs.changed.outputs.targets != '' }}
strategy:
fail-fast: false
matrix:
# Read back changd targets to create build matrix
target: ${{ fromJSON(needs.changed.outputs.targets) }}
- uses: actions/checkout@v3
run: sudo contrib/actions/install-dependencies.sh
run: contrib/actions/run-build.sh ${{ matrix.target }}
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
path: openwrt/logs
uses: actions/upload-artifact@v3