substrate-etl Report Generation #4633
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: substrate-etl Report Generation | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/deploy.yml | |
- reporter.js | |
- generateNetworksSummary | |
schedule: | |
- cron: '0 */6 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: [17.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use node js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: substrate-etl Report Generation | |
run: node generateNetworksSummary | |
- name: Configure Git Client | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Set timestamp | |
run: | | |
echo "CURRENT_TIMESTAMP=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV | |
- name: Commit changes to substrate-etl | |
run: | | |
git add --all SUMMARY.md kusama/* polkadot/* && \ | |
git commit -m "[Auto] Substrate-etl Summary (${{ env.CURRENT_TIMESTAMP }})" || echo "No changes to commit" | |
- name: Push changes to substrate-etl | |
run: git push origin $BRANCH_NAME | |
- name: send Notification to telegram | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
${{ github.actor }} created commit: | |
Commit message: ${{ github.event.commits[0].message }} | |
Repository: ${{ github.repository }} | |
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
# with: | |
# to: ${{ secrets.TELEGRAM_TO }} | |
# token: ${{ secrets.TELEGRAM_TOKEN }} | |
# message: | | |
# ${{ github.actor }} created commit: | |
# Commit message: ${{ github.event.commits[0].message }} | |
# Repository: ${{ github.repository }} | |
# See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} |