From 3a95915f02c175b4c299a117fa71fc507a09f5c3 Mon Sep 17 00:00:00 2001 From: Salman Wahib Date: Fri, 20 Oct 2023 20:36:59 +0000 Subject: [PATCH] initial: add template CI for irs_pusher Signed-off-by: Salman Wahib --- .github/workflows/pusher.yaml | 55 +++++++++++++++++++++++++++++++++++ config.yaml | 15 ++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/pusher.yaml create mode 100644 config.yaml diff --git a/.github/workflows/pusher.yaml b/.github/workflows/pusher.yaml new file mode 100644 index 0000000..de8baaa --- /dev/null +++ b/.github/workflows/pusher.yaml @@ -0,0 +1,55 @@ +name: IRS Pusher + +on: + push: + branches: + - master + +jobs: + commit: + name: Massal Scanner + runs-on: ubuntu-latest + + steps: + - name: Git Checkout Latest + uses: actions/checkout@v3 + - name: Set Up Python Latest + uses: actions/setup-python@v3 + with: + token: ${{ secrets.ACCESS_TOKEN }} + + - name: Fetch last commit + shell: bash + run: | + echo "latestcommit=$(git rev-parse HEAD)" >> $GITHUB_ENV + + - name: Update Package Python + run: | + python -m pip install --upgrade pip + pip install requests + pip install logging + pip install PyYaml + + - name: Integration Repository & Starting Scanner + shell: bash + run: | + git clone https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com/nodexemperor/irs --depth=1 + git clone https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com/nodexemperor/irs_output + cp config.yaml irs/.irs/ + cd irs + echo "irslatestcommit=$(git rev-parse HEAD)" >> $GITHUB_ENV + ./irs-massal.py + + - name: Updating Commit To irs_output + shell: bash + run: | + cd irs_output + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + date="$(date)" + git add . + git commit --amend -am "synchronize: ${date} + + IRS commit: ${{ env.irslatestcommit }} + Builder commit: ${{ env.latestcommit }}" -s + git push -f || echo "No changes to commit" diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..1176917 --- /dev/null +++ b/config.yaml @@ -0,0 +1,15 @@ +output_dir: + mainnet: "irs_output/mainnet" + testnet: "irs_output/testnet" + +mainnet: + nolus: + rpc: ["http://5.9.99.172:19757", "http://65.108.199.120:35457"] + quasar: + rpc: ["http://51.89.190.33:26657", "http://34.175.55.194:26657"] + +testnet: + nolus: + rpc: ["https://nolus-testnet.rpc.kjnodes.com"] + quasar: + rpc: ["https://quasar-testnet.rpc.kjnodes.com"]