Rename prefix #6
Workflow file for this run
This file contains 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: Test for block.json files. | |
on: | |
pull_request: | |
branches: [ trunk, develop ] | |
jobs: | |
block-file-check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get all files | |
id: changed-block-json-files | |
uses: tj-actions/changed-files@v44 | |
- name: Leave a comment and reject PR if block.json file is present | |
if: contains(steps.changed-block-json-files.outputs.all_changed_files, 'block.json') | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '> [!CAUTION]\n> This PR includes a `block.json` file. If you are adding a new block, please ensure this goes into [the A8C Special Projects Monorepo](https://github.com/a8cteam51/special-projects-blocks-monorepo) instead. You will find[ full documentation on the process here](https://github.com/a8cteam51/special-projects-blocks-monorepo/wiki). Please discuss with A8CSP Engineering Leads if you believe your block should be exempt from the monorepo.' | |
}) | |
core.setFailed('This PR included a block.json file and so was rejected.') |