Merge pull request #379 from nodenv/update-node-build-prerelease.rb-1… #571
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: brew test-bot | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: {} | |
| jobs: | |
| test-bot: | |
| strategy: | |
| fail-fast: false | |
| matrix: { os: [ubuntu-22.04, macos-15-intel, macos-26] } | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| actions: read | |
| checks: read | |
| contents: read | |
| packages: read | |
| pull-requests: read | |
| steps: | |
| - uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | |
| with: { egress-policy: audit } | |
| - id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@6c79ae0677a9b0b8046a936b4ada8980885eafb8 # main | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ${{ steps.set-up-homebrew.outputs.gems-path }} | |
| key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} | |
| restore-keys: ${{ matrix.os }}-rubygems- | |
| - run: brew test-bot --only-cleanup-before | |
| - run: brew test-bot --only-setup | |
| - run: brew test-bot --only-tap-syntax | |
| - name: Base64-encode GITHUB_TOKEN for HOMEBREW_DOCKER_REGISTRY_TOKEN | |
| id: base64-encode | |
| if: github.event_name == 'pull_request' | |
| env: | |
| TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| base64_token=$(echo -n "${TOKEN}" | base64 | tr -d "\\n") | |
| echo "::add-mask::${base64_token}" | |
| echo "token=${base64_token}" >> "${GITHUB_OUTPUT}" | |
| - run: brew test-bot --only-formulae --root-url=https://ghcr.io/v2/nodenv/nodenv | |
| if: github.event_name == 'pull_request' | |
| env: | |
| HOMEBREW_DOCKER_REGISTRY_TOKEN: ${{ steps.base64-encode.outputs.token }} | |
| - name: Upload bottles as artifact | |
| if: always() && github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: bottles_${{ matrix.os }} | |
| path: "*.bottle.*" |