-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change validation to script from another repo
- Loading branch information
1 parent
43a495f
commit 3a147ec
Showing
1 changed file
with
21 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,31 @@ | ||
name: Validate Pull Request | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
pull_request_target: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
validate-pr: | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
|
||
- name: Install dependencies | ||
run: npm install tsx @actions/core @actions/github sharp ajv ajv-formats json-source-map | ||
|
||
- name: Detect changed files | ||
uses: yumemi-inc/changed-files@v3 | ||
id: changes | ||
|
||
- name: Validate file structure | ||
run: npx tsx .github/workflows/scripts/validate-fs.ts ${{ steps.changes.outputs.files }} | ||
id: files | ||
|
||
- name: Validate metadata | ||
if: steps.files.outputs.metadata | ||
run: npx tsx .github/workflows/scripts/validate-metadata.ts ${{ steps.files.outputs.metadata }} | ||
|
||
- name: Validate logo | ||
if: steps.files.outputs.logo | ||
run: npx tsx .github/workflows/scripts/validate-logo.ts ${{ steps.files.outputs.logo }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
|
||
- name: Detect changed files | ||
uses: yumemi-inc/changed-files@v3 | ||
id: changes | ||
|
||
- name: Validate | ||
uses: symbioticfi/metadata-validation-scripts@main | ||
with: | ||
files: ${{ steps.changes.outputs.files }} | ||
issue: ${{ github.event.number }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |