diff --git a/.github/workflows/benches-push.yml b/.github/workflows/benches-push.yml new file mode 100644 index 00000000..da933ba5 --- /dev/null +++ b/.github/workflows/benches-push.yml @@ -0,0 +1,25 @@ +name: Update benches (push) + +on: + push: + branches: + - "next" + +jobs: + request-bench: + name: Add request for updating bench + runs-on: ubuntu-latest + steps: + - name: Clone perf repo + run: git clone https://github.com/skytable/perf.git + - name: Configure git + run: | + git config --global user.name "Glydr" + git config --global user.email "${{ secrets.GLYDR_MAIL }}" + - name: Add request and push + run: | + cd perf + printf "\ntarget/release/skyreport update next" >> requests.txt + git add . + git commit -m "Add update request for next" -m "Triggered by $GITHUB_SHA" + git push https://glydr:${{ secrets.GLYDR }}@github.com/skytable/perf.git --all diff --git a/.github/workflows/benches-release.yml b/.github/workflows/benches-release.yml new file mode 100644 index 00000000..ce269f2b --- /dev/null +++ b/.github/workflows/benches-release.yml @@ -0,0 +1,29 @@ +name: Update benches (release) + +on: + push: + tags: + - "v*" + +jobs: + request-bench: + name: Add request for updating bench + runs-on: ubuntu-latest + steps: + - name: Clone perf repo + run: git clone https://github.com/skytable/perf.git + - name: Configure git + run: | + git config --global user.name "Glydr" + git config --global user.email "${{ secrets.GLYDR_MAIL }}" + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Add request and push + env: + REL: ${{ env.RELEASE_VERSION }} + run: | + cd perf + printf "\ntarget/release/skyreport update release $REL" >> requests.txt + git add . + git commit -m "Add update request for release ``$REL``" + git push https://glydr:${{ secrets.GLYDR }}@github.com/skytable/perf.git --all