name: Build updated packages on: push: paths-ignore: - '.github/workflows/**' - 'keyring.asc' jobs: evaluate: name: Evaluate changed packages runs-on: ubuntu-26.04 permissions: contents: read outputs: packages: ${{ steps.get-packages.outputs.packages }} steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 persist-credentials: false - name: Figure out which packages have changed since the last push id: get-packages run: | echo "packages=["$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -v '^\(\.git\|keyring.asc\)' | sed 's/\/.*$//g' | sort -u | xargs -I{} bash -c "test -d \"{}\" && echo \"\\\"{}\\\"\"" | head -c -1 | sed -z 's/\n/,/g')"]" >> $GITHUB_OUTPUT build: name: Build needs: evaluate if: ${{ needs.evaluate.outputs.packages != '[]' }} strategy: matrix: pkgname: ${{ fromJSON(needs.evaluate.outputs.packages) }} fail-fast: false uses: $/.github/workflows/build-package-reusable.yml with: pkgname: ${{ matrix.pkgname }} artifact-name: build-output-${{ matrix.pkgname }} set-source-date-epoch-from-git: true permissions: id-token: write contents: read attestations: write artifact-metadata: write