build(deps): bump docker/metadata-action from 5 to 6 #298
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Build | |
| on: | |
| pull_request_target: | |
| types: [labeled] | |
| env: | |
| XBPS_ALLOW_RESTRICTED: yes | |
| XBPS_ALLOW_CHROOT_BREAKOUT: yes | |
| permissions: | |
| contents: read | |
| packages: read | |
| jobs: | |
| check-changes: | |
| if: github.event.label.name == 'ok-to-build' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| should_run: ${{ steps.set-matrix.outputs.should_run }} | |
| steps: | |
| - name: Checkout (PR code for diff) | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Record PR Number | |
| run: | | |
| mkdir -p pr-meta | |
| echo "${{ github.event.pull_request.number }}" > pr-meta/pr_number.txt | |
| - name: Upload PR Metadata | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pr-meta | |
| path: pr-meta/pr_number.txt | |
| - name: Determine Systems to Build | |
| id: set-matrix | |
| run: | | |
| git config --global --add safe.directory "$PWD" | |
| python3 vup/scripts/check_changes.py | |
| verify-build: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: read | |
| container: | |
| image: ghcr.io/vup-linux/vup-builder:latest | |
| options: --privileged | |
| strategy: | |
| matrix: ${{ fromJson(needs.check-changes.outputs.matrix) }} | |
| fail-fast: false | |
| concurrency: | |
| group: pr-vup-${{ matrix.category }}-${{ github.event.pull_request.head.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout VUP | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| path: vup | |
| fetch-depth: 0 | |
| - name: Checkout void-packages (Build System) | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: void-linux/void-packages | |
| path: void-packages | |
| - name: Cache xbps-src bootstrap | |
| id: cache-bootstrap | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| void-packages/masterdir-* | |
| void-packages/hostdir/repocache | |
| key: xbps-bootstrap-${{ runner.os }}-${{ hashFiles('void-packages/srcpkgs/base-chroot/template') }} | |
| restore-keys: | | |
| xbps-bootstrap-${{ runner.os }}- | |
| - name: Setup xbps-src | |
| run: | | |
| cd void-packages | |
| cp ../vup/vup/xbps-src . | |
| mkdir -p srcpkgs/core/xbps-triggers | |
| cp -r ../vup/vup/srcpkgs/core/xbps-triggers/* srcpkgs/core/xbps-triggers/ | |
| chmod +x xbps-src | |
| echo "XBPS_ALLOW_RESTRICTED=yes" >> etc/conf | |
| - name: Binary Bootstrap | |
| if: steps.cache-bootstrap.outputs.cache-hit != 'true' | |
| run: | | |
| cd void-packages | |
| ./xbps-src binary-bootstrap | |
| - name: Build Modified Packages | |
| run: | | |
| cd void-packages | |
| cat_path="../vup/vup/srcpkgs/${{ matrix.category }}" | |
| if [ "${{ matrix.packages }}" = "ALL" ]; then | |
| PKGS=$(ls "$cat_path" 2>/dev/null || echo "") | |
| else | |
| PKGS="${{ matrix.packages }}" | |
| fi | |
| mkdir -p ../reports | |
| REPORT_FILE="../reports/report-${{ matrix.category }}.json" | |
| echo "[]" > "$REPORT_FILE" | |
| for pkgname in $PKGS; do | |
| pkgpath="$cat_path/$pkgname" | |
| [ ! -d "$pkgpath" ] && continue | |
| echo "Building $pkgname..." | |
| rm -rf "srcpkgs/$pkgname" | |
| cp -r "$pkgpath" "srcpkgs/" | |
| status="pending" | |
| if vuru src pkg "$pkgname" > build.log 2>&1; then | |
| status="success" | |
| else | |
| echo "Build FAILED: $pkgname" | |
| status="failure" | |
| cat build.log | |
| fi | |
| python3 ../vup/vup/scripts/update_report.py "$REPORT_FILE" "$pkgname" "$status" "build.log" | |
| rm -rf "srcpkgs/$pkgname" | |
| done | |
| - name: Upload Build Reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pr-report-${{ matrix.category }} | |
| path: reports/*.json |