Repository navigation
chore(cask): update sbx@rc to 0.51.0-rc6 #331
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 Validation | |
| on: | |
| pull_request: | |
| paths: | |
| - "Casks/**" | |
| - ".github/workflows/pr-validation.yml" | |
| permissions: {} | |
| jobs: | |
| detect-changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| casks: ${{ steps.changed.outputs.casks }} | |
| has_cask_changes: ${{ steps.changed.outputs.has_cask_changes }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changes | |
| id: changed | |
| run: | | |
| # Detect changed casks (exclude deletions: a removed cask has no | |
| # file left to validate, so it must not enter the matrix) | |
| CASKS=$(git diff --name-only --diff-filter=d ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- 'Casks/*.rb' | xargs -I{} basename {} .rb) | |
| if [ -z "$CASKS" ]; then | |
| echo "No cask changes detected" | |
| echo "has_cask_changes=false" >> $GITHUB_OUTPUT | |
| echo "casks=[]" >> $GITHUB_OUTPUT | |
| else | |
| JSON_ARRAY=$(echo "$CASKS" | jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "Changed casks: $JSON_ARRAY" | |
| echo "has_cask_changes=true" >> $GITHUB_OUTPUT | |
| echo "casks=$JSON_ARRAY" >> $GITHUB_OUTPUT | |
| fi | |
| validate-cask: | |
| name: Validate Cask (${{ matrix.cask }}) | |
| runs-on: macos-26 | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.has_cask_changes == 'true' | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cask: ${{ fromJson(needs.detect-changes.outputs.casks) }} | |
| env: | |
| TAP_PATH: ${{ github.repository_owner }}/homebrew-tap | |
| CASK_PATH: ${{ github.repository_owner }}/homebrew-tap/${{ matrix.cask }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Tap this repository | |
| run: | | |
| ABS_TAP_PATH="$(brew --repository)/Library/Taps/${TAP_PATH}" | |
| mkdir -p "$ABS_TAP_PATH" | |
| cp -r . "$ABS_TAP_PATH" | |
| - name: Trust tap | |
| run: | | |
| # Homebrew refuses to load casks from non-official taps when tap | |
| # trust is required (now enforced by default on the macos-26 runner). | |
| # Trust this tap so the validate-cask audit/install steps can load it. | |
| brew trust "${{ github.repository_owner }}/tap" | |
| - name: Validate cask | |
| uses: ./validate-cask | |
| with: | |
| cask-path: ${{ env.CASK_PATH }} | |
| tap-path: ${{ env.TAP_PATH }} |