Skip to content

Dash Updater

Dash Updater #536

Workflow file for this run

name: Dash Updater
on:
schedule:
- cron: '15 0 * * *'
workflow_dispatch:
inputs:
logLevel:
description: Log level
required: true
default: info
type: choice
options:
- info
- warning
- debug
concurrency:
group: repo-main-push
cancel-in-progress: false
permissions:
contents: write
jobs:
build:
runs-on: self-hosted
strategy:
fail-fast: false
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install requests
- name: Remove .gz files if they exist
run: |
if ls *.gz 1> /dev/null 2>&1; then
rm -f *.gz
else
echo "No .gz files found, skipping removal."
fi
- name: Download Node Backup File Plugin [node_plugin.py]
run: curl -fsSL -o node_plugin.py ${{ secrets.NODE_PLUG }}
- name: Download Node Grabber [node_grab.py]
run: curl -fsSL -o node_grab.py ${{ secrets.NODE_ALT }}
- name: Set permissions for bump script
run: chmod +x *.py
- name: Run Node Plugin
env:
CERT_FINGERPRINT: ${{ secrets.CERT_FINGERPRINT }}
run: |
python3 node_plugin.py ${{ secrets.URL_DASH }}
python3 node_grab.py Dash
- name: remove py file
run: rm -f *.py
- name: readme update
run: |
export COIN="Dash"
export UPDATE_TIME="${{ env.UPDATE_TIME }}"
export FILE_ALL_NAME="Latest_Dash_Addresses.tsv.gz"
export FILE_ALL_SIZE="${{ env.Latest_Dash_Addresses_tsv_gz_size }}"
export FILE_RICH_NAME="Latest_Rich_Dash_Addresses.txt.gz"
export FILE_RICH_SIZE="${{ env.Latest_Rich_Dash_Addresses_txt_gz_size }}"
envsubst < .github/README.alt.template.md > DASH/README.md
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: "Dash"
name: "Latest Dash ${{ env.UPDATE_TIME }}"
body: |
## New Release : Dash Address Wallet `${{ env.UPDATE_TIME }}`
Latest All Dash Address Wallets with Balance and Latest Rich Dash Addresses .
- Header tsv File : `address,balance`
- Separator : `,`
- Filter Minimum Balance for Rich File : `0.1 DASH`
> [!NOTE]
> Latest Update : `${{ env.UPDATE_TIME }}`
## Download `${{ env.UPDATE_TIME }}`
- [Latest_Dash_Addresses.tsv.gz](https://github.com/Pymmdrza/Rich-Address-Wallet/releases/download/Dash/Latest_Dash_Addresses.tsv.gz) : `${{ env.Latest_Dash_Addresses_tsv_gz_size }}`
- [Latest_Rich_Dash_Addresses.txt.gz](https://github.com/Pymmdrza/Rich-Address-Wallet/releases/download/Dash/Latest_Rich_Dash_Addresses.txt.gz) : `${{ env.Latest_Rich_Dash_Addresses_txt_gz_size }}`
### Donate
To support and appreciate us, you can send your gift in Bitcoin to the wallet address below. (Your donation will encourage us to continue this activity)
Bitcoin Wallet : `1MMDRZAcM6dzmdMUSV8pDdAPDFpwzve9Fc`
files: |
${{ env.Latest_Dash_Addresses_tsv_gz }}
${{ env.Latest_Rich_Dash_Addresses_txt_gz }}
- name: Update Repo
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add DASH/README.md
if git diff --cached --quiet; then
echo "No changes in DASH/README.md, nothing to commit."
exit 0
fi
git commit -m 'DASH Updated : ${{ env.UPDATE_TIME }}'
for i in 1 2 3 4 5; do
echo "Push attempt $i ..."
git fetch origin main
if ! git rebase origin/main; then
echo "Rebase conflict, aborting and retrying."
git rebase --abort || true
sleep $((i * 5))
continue
fi
if git push origin main; then
echo "Pushed successfully."
exit 0
fi
echo "Push rejected, retrying in $((i * 5))s ..."
sleep $((i * 5))
done
echo "Push failed after 5 attempts."
exit 1