Return 404 for view-capability-denied REST job listing requests #1308
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: Plugin Build | |
| on: | |
| - pull_request | |
| jobs: | |
| build: | |
| name: Plugin Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get npm cache directory | |
| id: npm-cache | |
| run: | | |
| echo "::set-output name=dir::$(npm config get cache)" | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.npm-cache.outputs.dir }} | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| tools: composer | |
| coverage: none | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install JS dependencies | |
| run: npm ci | |
| - name: Install PHP dependencies | |
| run: composer install --no-ansi --no-interaction --prefer-dist --no-progress | |
| - name: Build Plugin | |
| run: npm run build | |
| - name: Decompress plugin | |
| run: unzip build/wp-job-manager.zip -d wp-job-manager | |
| - name: Store Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wp-job-manager-${{ github.event.pull_request.head.sha }} | |
| path: ${{ github.workspace }}/wp-job-manager/ | |
| retention-days: 7 | |
| - name: Save plugin zip and add link to the PR description | |
| env: | |
| WPJMCOM_API_LOGIN: ${{ secrets.WPJMCOM_API_LOGIN }} | |
| GH_TOKEN: ${{ github.token }} | |
| run: node scripts/upload-and-link-plugin-zip.mjs --pr ${{ github.event.number }} --commit ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.merged && '--merged' || '' }} |