Skip to content

Commit

Permalink
Change validation to script from another repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-symbiotic committed Jan 15, 2025
1 parent 43a495f commit 3a147ec
Showing 1 changed file with 21 additions and 34 deletions.
55 changes: 21 additions & 34 deletions .github/workflows/validate-pr.yml
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 }}

0 comments on commit 3a147ec

Please sign in to comment.