Skip to content

Commit

Permalink
Disable schedule report ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Jul 5, 2023
1 parent 545a781 commit e8a8e3f
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
name: Report

on:
push:
branches: [main]
schedule:
- cron: "0 */2 * * *"
workflow_dispatch:

jobs:
endpoint-report:
name: Quality Report
runs-on: ubuntu-latest
strategy:
matrix:
chain:
- crab
- darwinia
steps:
- uses: actions/checkout@v2

- name: Install dependencies
env:
MILLER_VERSION: 6.7.0
run: |
BIN_PATH=$HOME/.local/bin
rm -rf ${BIN_PATH} || true
mkdir -p ${BIN_PATH}
# miller
curl -LO https://github.com/johnkerl/miller/releases/download/v${MILLER_VERSION}/miller-${MILLER_VERSION}-linux-amd64.tar.gz
tar -zxf miller-${MILLER_VERSION}-linux-amd64.tar.gz -C ./
mv miller-${MILLER_VERSION}-linux-amd64/mlr $BIN_PATH/
# set execute permission
chmod +x ${BIN_PATH}/mlr
# clean
rm -rf miller-*
- name: Check http
run: scripts/report-endpoint.sh ${{ matrix.chain }}

- name: Remove old report
run: |
THREE_MONTHS_AGO=$(date --date='3 months ago' +%Y-%m)
rm -rf report/${THREE_MONTHS_AGO}*
- name: Commit files
run: |
MSG=$(cat dist/latest.log)
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git pull origin ${{ github.ref }}
git add .
git commit -a -m "${MSG:-New report generated}" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}


#name: Report
#
#on:
# push:
# branches: [main]
# schedule:
# - cron: "0 */2 * * *"
# workflow_dispatch:
#
#jobs:
# endpoint-report:
# name: Quality Report
# runs-on: ubuntu-latest
# strategy:
# matrix:
# chain:
# - crab
# - darwinia
# steps:
# - uses: actions/checkout@v2
#
# - name: Install dependencies
# env:
# MILLER_VERSION: 6.7.0
# run: |
# BIN_PATH=$HOME/.local/bin
# rm -rf ${BIN_PATH} || true
# mkdir -p ${BIN_PATH}
#
# # miller
# curl -LO https://github.com/johnkerl/miller/releases/download/v${MILLER_VERSION}/miller-${MILLER_VERSION}-linux-amd64.tar.gz
# tar -zxf miller-${MILLER_VERSION}-linux-amd64.tar.gz -C ./
# mv miller-${MILLER_VERSION}-linux-amd64/mlr $BIN_PATH/
#
# # set execute permission
# chmod +x ${BIN_PATH}/mlr
#
# # clean
# rm -rf miller-*
#
# - name: Check http
# run: scripts/report-endpoint.sh ${{ matrix.chain }}
#
# - name: Remove old report
# run: |
# THREE_MONTHS_AGO=$(date --date='3 months ago' +%Y-%m)
# rm -rf report/${THREE_MONTHS_AGO}*
#
# - name: Commit files
# run: |
# MSG=$(cat dist/latest.log)
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# git pull origin ${{ github.ref }}
# git add .
# git commit -a -m "${MSG:-New report generated}" || true
#
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
#
#

0 comments on commit e8a8e3f

Please sign in to comment.