From 51725e909d5282781ec6d03a19955c2feca35e6f Mon Sep 17 00:00:00 2001 From: Joshua <62268199+minimalsm@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:12:48 +0100 Subject: [PATCH] Test new workflow --- .github/workflows/wallets-check.yml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/wallets-check.yml diff --git a/.github/workflows/wallets-check.yml b/.github/workflows/wallets-check.yml new file mode 100644 index 00000000000..4d07cf98a83 --- /dev/null +++ b/.github/workflows/wallets-check.yml @@ -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."