Adding vault global inclusion exclusions #53
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: Check Prebuild Binaries | |
| on: | |
| pull_request: | |
| paths: | |
| - 'scripts/prebuild/**' | |
| - 'scripts/utils/**' | |
| - 'scripts/algolia/**' | |
| - 'productConfig.mjs' | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-prebuild-binaries: | |
| runs-on: ubuntu-latest | |
| name: Validate prebuild binaries are updated | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45.0.7 | |
| with: | |
| files: | | |
| scripts/prebuild/** | |
| scripts/utils/** | |
| scripts/algolia/** | |
| productConfig.mjs | |
| files_ignore: | | |
| scripts/prebuild/prebuild-arm-mac-binary.gz | |
| scripts/prebuild/prebuild-x64-linux-binary.gz | |
| scripts/prebuild/prebuild-arm-linux-binary.gz | |
| - name: Check if prebuild scripts changed | |
| id: check-changes | |
| run: | | |
| echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | |
| if [[ "${{ steps.changed-files.outputs.any_changed }}" == "true" ]]; then | |
| echo "prebuild_changed=true" >> $GITHUB_OUTPUT | |
| echo "✅ Prebuild scripts have changed" | |
| else | |
| echo "prebuild_changed=false" >> $GITHUB_OUTPUT | |
| echo "ℹ️ No prebuild script changes detected" | |
| fi | |
| - name: Check if binaries were updated | |
| id: check-binaries | |
| if: steps.check-changes.outputs.prebuild_changed == 'true' | |
| uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45.0.7 | |
| with: | |
| files: | | |
| scripts/prebuild/prebuild-arm-mac-binary.gz | |
| scripts/prebuild/prebuild-x64-linux-binary.gz | |
| scripts/prebuild/prebuild-arm-linux-binary.gz | |
| - name: Validate binary updates | |
| if: steps.check-changes.outputs.prebuild_changed == 'true' | |
| run: | | |
| echo "Prebuild scripts changed: ${{ steps.check-changes.outputs.prebuild_changed }}" | |
| echo "Binaries changed: ${{ steps.check-binaries.outputs.any_changed }}" | |
| echo "Changed binaries: ${{ steps.check-binaries.outputs.all_changed_files }}" | |
| if [[ "${{ steps.check-binaries.outputs.any_changed }}" != "true" ]]; then | |
| echo "❌ ERROR: Prebuild scripts have been modified but the required gzipped binaries have not been updated!" | |
| echo "" | |
| echo "The following files were changed in scripts/prebuild/:" | |
| echo "${{ steps.changed-files.outputs.all_changed_files }}" | |
| echo "" | |
| echo "Please ensure you have updated the following gzipped binaries:" | |
| echo "- scripts/prebuild/prebuild-arm-mac-binary.gz" | |
| echo "- scripts/prebuild/prebuild-x64-linux-binary.gz" | |
| echo "- scripts/prebuild/prebuild-arm-linux-binary.gz" | |
| echo "" | |
| echo "ℹ️ You can rebuild them with 'npm run compile-prebuild' and then commit the changes." | |
| exit 1 | |
| else | |
| # Check if all binaries were updated | |
| ARM_MAC_UPDATED=false | |
| X64_LINUX_UPDATED=false | |
| ARM_LINUX_UPDATED=false | |
| if echo "${{ steps.check-binaries.outputs.all_changed_files }}" | grep -q "prebuild-arm-mac-binary.gz"; then | |
| ARM_MAC_UPDATED=true | |
| echo "✅ ARM Mac binary updated" | |
| fi | |
| if echo "${{ steps.check-binaries.outputs.all_changed_files }}" | grep -q "prebuild-x64-linux-binary.gz"; then | |
| X64_LINUX_UPDATED=true | |
| echo "✅ x64 Linux binary updated" | |
| fi | |
| if echo "${{ steps.check-binaries.outputs.all_changed_files }}" | grep -q "prebuild-arm-linux-binary.gz"; then | |
| ARM_LINUX_UPDATED=true | |
| echo "✅ ARM Linux binary updated" | |
| fi | |
| if [[ "$ARM_MAC_UPDATED" != "true" || "$X64_LINUX_UPDATED" != "true" || "$ARM_LINUX_UPDATED" != "true" ]]; then | |
| echo "⚠️ WARNING: Not all required binaries were updated:" | |
| [[ "$ARM_MAC_UPDATED" != "true" ]] && echo " - Missing: scripts/prebuild/prebuild-arm-mac-binary.gz" | |
| [[ "$X64_LINUX_UPDATED" != "true" ]] && echo " - Missing: scripts/prebuild/prebuild-x64-linux-binary.gz" | |
| [[ "$ARM_LINUX_UPDATED" != "true" ]] && echo " - Missing: scripts/prebuild/prebuild-arm-linux-binary.gz" | |
| echo "" | |
| echo "ℹ️ You can rebuild them with 'npm run compile-prebuild' and then commit the changes." | |
| exit 1 | |
| fi | |
| fi | |
| - name: No changes detected | |
| if: steps.check-changes.outputs.prebuild_changed == 'false' | |
| run: | | |
| echo "✅ No prebuild script changes detected. No binary validation required." |