Skip to content

Commit b9b99e2

Browse files
committed
Try pushing from push.yml
1 parent a3614d0 commit b9b99e2

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/push.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@ jobs:
290290
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
291291
- name: Benchmark
292292
run: php benchmark/benchmark.php true
293+
- name: Push the update
294+
run: |
295+
set -x
296+
cd benchmark/repos/data
297+
git add .
298+
if git diff --cached --quiet; then
299+
exit 0
300+
fi
301+
git commit -m "Add result for ${{ github.repository }}@${{ steps.determine-commit.outputs.sha }}"
302+
git push
293303
- name: Show diff
294304
if: github.event_name == 'pull_request'
295305
run: >-

benchmark/benchmark.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ function commitResult(string $result) {
3838
}
3939
file_put_contents($summaryFile, $result);
4040

41-
runCommand(['git', 'add', '--end-of-options', $summaryFile], $repo);
42-
runCommand(['git', 'commit', '--allow-empty', '-m', 'Add result for php/php-src@' . $commitHash, '--author', 'Benchmark <benchmark@php.net>'], $repo);
43-
runCommand(['git', 'push'], $repo);
41+
// runCommand(['git', 'add', '--end-of-options', $summaryFile], $repo);
42+
// runCommand(['git', 'commit', '--allow-empty', '-m', 'Add result for php/php-src@' . $commitHash, '--author', 'Benchmark <benchmark@php.net>'], $repo);
43+
// runCommand(['git', 'push'], $repo);
4444
}
4545

4646
function getPhpSrcCommitHash(): string {

0 commit comments

Comments
 (0)