Add 1DC - Anchor Down Cinema - to Facilities #3207
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: validate | |
on: [push, pull_request, pull_request_target, workflow_dispatch] | |
jobs: | |
build: | |
if: (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) | |
runs-on: ubuntu-latest | |
env: | |
G_SAFE_BROWSING_API_KEY: ${{ secrets.G_SAFE_BROWSING_API_KEY }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- run: npm install | |
- name: test scripts | |
run: npm test | |
- name: validate registries | |
run: npm run validate | |
- name: verify that the registries are canonicalized | |
if: (github.ref == 'refs/heads/master' || github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.actor != 'dependabot[bot]' | |
run: | | |
npm run canonicalize | |
git add src/main/data | |
git diff-index --quiet HEAD src/main/data | |
- name: commit canonicalized registries | |
if: github.ref != 'refs/heads/master' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]' | |
run: | | |
npm run canonicalize | |
git add src/main/data | |
git config --global user.name 'ISDCF Registries Canonicalizer' | |
git config --global user.email '[email protected]' | |
git diff-index --quiet HEAD src/main/data || git commit -m "Registries have been canonicalized" | |
git push | |
- name: Repository Dispatch | |
if: github.ref == 'refs/heads/master' | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.REGISTRIES_SITE_PAT }} | |
repository: isdcf/registries-site | |
event-type: build-site |