Update aapt2.json #1
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: Validate Data Files | |
on: | |
pull_request: | |
branches: [ "master" ] | |
paths: | |
- 'data/**/*.json' | |
# Allow manual triggering of the workflow | |
workflow_dispatch: | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Validate JSON files | |
run: bun run validate | |
- name: Run merge test | |
run: bun run node scripts/merge.js | |
- name: Add validation status comment | |
if: always() | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const conclusion = "${{ job.status }}"; | |
const emoji = conclusion === "success" ? "✅" : "❌"; | |
const message = conclusion === "success" | |
? "All data files are valid!" | |
: "There are issues with the data files. Please check the action logs for details."; | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `## Data Validation ${emoji}\n\n${message}` | |
}) |