Skip to content

Commit

Permalink
Test new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
minimalsm committed Aug 30, 2024
1 parent 29ae383 commit 51725e9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/wallets-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check Wallet Data for "new_to_crypto: true"

on:
pull_request:
paths:
- 'data/wallets/wallet-data.ts'

jobs:
check_new_to_crypto:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check for "new_to_crypto: true"
id: check_new_to_crypto
run: |
if git diff --name-only HEAD^ | grep -q "data/wallets/wallet-data.ts"; then
if git diff -U0 HEAD^ HEAD data/wallets/wallet-data.ts | grep -q "+.*new_to_crypto: true"; then
echo "New wallet added with 'new_to_crypto: true'"
echo "::set-output name=new_to_crypto_found::true"
else
echo "::set-output name=new_to_crypto_found::false"
fi
fi
- name: Comment on PR if "new_to_crypto: true" is added
if: steps.check_new_to_crypto.outputs.new_to_crypto_found == 'true'
uses: actions-ecosystem/action-add-comment@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
comment: "A wallet has been added with 'new_to_crypto: true'. Please ensure this meets our guidelines."

0 comments on commit 51725e9

Please sign in to comment.