Skip to content

Commit 51725e9

Browse files
committed
Test new workflow
1 parent 29ae383 commit 51725e9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/wallets-check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check Wallet Data for "new_to_crypto: true"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'data/wallets/wallet-data.ts'
7+
8+
jobs:
9+
check_new_to_crypto:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Check for "new_to_crypto: true"
16+
id: check_new_to_crypto
17+
run: |
18+
if git diff --name-only HEAD^ | grep -q "data/wallets/wallet-data.ts"; then
19+
if git diff -U0 HEAD^ HEAD data/wallets/wallet-data.ts | grep -q "+.*new_to_crypto: true"; then
20+
echo "New wallet added with 'new_to_crypto: true'"
21+
echo "::set-output name=new_to_crypto_found::true"
22+
else
23+
echo "::set-output name=new_to_crypto_found::false"
24+
fi
25+
fi
26+
27+
- name: Comment on PR if "new_to_crypto: true" is added
28+
if: steps.check_new_to_crypto.outputs.new_to_crypto_found == 'true'
29+
uses: actions-ecosystem/action-add-comment@v1
30+
with:
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}
32+
comment: "A wallet has been added with 'new_to_crypto: true'. Please ensure this meets our guidelines."

0 commit comments

Comments
 (0)