Skip to content

Add Ucash Token to Base #4128

Add Ucash Token to Base

Add Ucash Token to Base #4128

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
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install dependencies
run: pnpm install --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@v41
with:
dir_names: true
files: |
data/**
- name: List all changed tokens
id: changed_tokens
run: |
tokens=""
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
token=$(echo -e "$file" | sed -nr "s|^data/([^/]*/?).*|\1|p")
tokens+="${token},"
done
echo "result=${tokens%,*}" >> $GITHUB_OUTPUT
- name: Validate token list
if: ${{ steps.changed_tokens.outputs.result != '' }}
run: |
pnpm validate --datadir ./data --tokens "${{ steps.changed_tokens.outputs.result }}" 2> err.txt 1> std.txt
- name: Print output
if: ${{ always() && steps.changed_tokens.outputs.result != '' }}
run: |
cat std.txt; cat err.txt
- name: Upload artifacts
if: ${{ always() && steps.changed_tokens.outputs.result != '' }}
uses: actions/upload-artifact@v3
with:
name: logs-artifact
path: |
pr.txt
err.txt
std.txt
- name: Upload validation results
if: ${{ always() && steps.changed_tokens.outputs.result != '' }}
uses: actions/upload-artifact@v3
with:
name: validation-artifacts
path: validation_results.txt