Skip to content

Update data.json

Update data.json #109

Workflow file for this run

name: Validate PR
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
validate:
name: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Save PR number
run: echo ${{ github.event.number }} > pr.txt
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v29
with:
files: |
data/**
- name: Validate token list
run: |
CHANGED=$(echo ${{ steps.changed-files.outputs.all_changed_files }} | sed -nr "s/data\/(.*?)\/.*/\1/p" | paste -sd "," -)
yarn validate --datadir ./data --tokens "${CHANGED}" 2> err.txt 1> std.txt
- name: Print output
if: ${{ always() }}
run: |
cat std.txt; cat err.txt
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: logs-artifact
path: |
pr.txt
err.txt
std.txt