Skip to content

Commit

Permalink
Use env vars for current ref and branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m committed Nov 29, 2024
1 parent da7ce1b commit fcbf618
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ end
task docker_test_perf: :docker_build_clang_release do
sh "docker run #{docker_run_flags} " \
"-e STATS_API_SECRET=#{(ENV['STATS_API_SECRET'] || '').inspect} " \
"-e GITHUB_SHA=#{(ENV['GITHUB_SHA'] || '').inspect} " \
"-e GITHUB_HEAD_REF=#{(ENV['GITHUB_HEAD_REF'] || '').inspect} " \
'--rm ' \
'--entrypoint rake ' \
"natalie_clang_#{ruby_version_string}_release test_perf"
Expand Down
4 changes: 2 additions & 2 deletions spec/support/test_perf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
pp totals

stats = {
commit: `git rev-parse HEAD`.strip,
branch: `git rev-parse --abbrev-ref HEAD`.strip,
commit: ENV.fetch('GITHUB_SHA'),
branch: ENV.fetch('GITHUB_HEAD_REF'),
ir: totals
}

Expand Down

0 comments on commit fcbf618

Please sign in to comment.