-
Notifications
You must be signed in to change notification settings - Fork 16
32 lines (29 loc) · 1.05 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: JSON validation
on: [pull_request]
jobs:
schema_validation:
name: JSON files are valid
runs-on: ubuntu-latest
container: node:latest
steps:
- uses: actions/checkout@v2
- name: install validator
run: npm install joi@^17.2.1
- name: validate all documents
run: node ./.github/workflows/validate.js
# Enable automatic merging on pull requests, so that once tests pass, the
# pull request will merge itself. No waiting. Let's simplify this thing!
merge:
name: turn on auto-merge
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: mgwalker/[email protected]
id: org-check
with:
orgs: 18f cloud-gov digital-analytics-program digitalgov presidential-innovation-fellows usagov uswds
- if: ${{ steps.org-check.outputs.in_orgs == 'true' || github.actor == 'dependabot[bot]' }}
run: gh pr merge "$GITHUB_HEAD_REF" --auto --squash