CI #686
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: CI | |
on: | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Setup dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Docker Setup Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Benchmark | |
env: | |
ENVD_ANALYTICS: false | |
ENVD_BUILD_OWNER: 1000 | |
run: | | |
python benchmark.py --path ./data.csv --github | |
- name: Update to git | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} | |
run: | | |
git config --global url."https://".insteadOf git:// | |
git config --global url."https://github.com/".insteadOf git@github.com: | |
remote_repo="https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
remote_branch=main | |
git config user.name "github-actions-bot" | |
git config user.email "github-actions-bot@users.noreply.github.com" | |
git add -f trend.png data.csv | |
git commit -s -m "CI: update benchmark data and image" | |
git push -f "${remote_repo}" main:${remote_branch} |