File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
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."
You can’t perform that action at this time.
0 commit comments