Skip to content

Commit 17ea1e8

Browse files
committed
Fix auto-commit.
1 parent 5fd2662 commit 17ea1e8

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

.github/workflows/perf.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ on:
2424

2525
env:
2626
TF_VAR_aws_access_key_id: ${{ secrets.INTEG_TEST_AWS_KEY_ID }}
27-
TF_VAR_aws_secret_access_key: ${{ secrets.INTEG_TEST_AWS_KEY_SECRET }}
27+
TF_VAR_aws_secret_access_key: ${{ secrets.INTEG_TEST_AWS_KEY_SECRET }}
28+
GH_PAGES_BRANCH: gh-pages
29+
MAX_BENCHMARKS_TO_KEEP: 100
30+
COMMIT_USER: Github Actions
31+
COMMIT_EMAIL: [email protected]
2832

2933
jobs:
3034
get-testing-version:
@@ -132,10 +136,6 @@ jobs:
132136
needs: [get-testing-version, run-perf-test]
133137
steps:
134138
- uses: actions/checkout@v2
135-
- uses: actions/checkout@v2
136-
with:
137-
ref: gh-pages
138-
path: gh-pages
139139

140140
- name: Setup Python
141141
uses: actions/[email protected]
@@ -150,29 +150,24 @@ jobs:
150150

151151
- name: Produce performance report
152152
run: python e2etest/get-performance-model-table.py ${{ needs.get-testing-version.outputs.testing_version }}
153-
154-
- name: Copy performance report
155-
run: rsync -avv performance-report.md gh-pages/benchmark/report.md
156-
157-
- name: Copy performance data
158-
run: rsync -avv performance-data.json gh-pages/benchmark/data
159153

160154
- name: Store benchmark result
161-
uses: benchmark-action/github-action-benchmark@v1
155+
uses: jefchien/github-action-benchmark@v1.11.12-alpha2
162156
with:
163157
tool: "customSmallerIsBetter"
164158
output-file-path: performance-data.json
165-
external-data-json-path: gh-pages/benchmark/data/previous-benchmark-data.json
166-
benchmark-data-dir-path: gh-pages/benchmark/trend
167-
skip-fetch-gh-pages: true
159+
benchmark-data-dir-path: benchmark/trend
160+
max-items-in-chart: ${{ env.MAX_BENCHMARKS_TO_KEEP }}
161+
gh-pages-branch: ${{ env.GH_PAGES_BRANCH }}
168162
github-token: ${{ secrets.GITHUB_TOKEN }}
163+
commit-sha: ${{ github.event.inputs.sha }}
169164
auto-push: false
170165

171166
- name: Commit to gh-pages branch
172-
uses: stefanzweifel/git-auto-commit-action@v4
173-
with:
174-
commit_message: "Update benchmarking"
175-
commit_options: "--amend"
176-
branch: gh-pages
177-
repository: gh-pages
178-
file_pattern: gh-pages/benchmark/report.md gh-pages/benchmark/data/* gh-pages/benchmark/trend/*
167+
run: |
168+
git switch ${{ env.GH_PAGES_BRANCH }}
169+
rsync -avv performance-report.md benchmark/report.md
170+
rsync -avv performance-data.json benchmark/data/
171+
git add benchmark/data/* benchmark/report.md
172+
git -c user.name="${{ env.COMMIT_USER }}" -c user.email="${{ env.COMMIT_EMAIL }}" commit --amend --reset-author -m "Update benchmarking for ${{ github.event.inputs.sha }}"
173+
git push origin ${{ env.GH_PAGES_BRANCH }}:${{ env.GH_PAGES_BRANCH }}

0 commit comments

Comments
 (0)