mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-06 21:49:33 +02:00
src: use the plumbed BLACKSMITH_BACKEND_URL if present
This commit is contained in:
parent
e836937c09
commit
4759d93c12
3 changed files with 7 additions and 5 deletions
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -10,9 +10,11 @@ import { Metric, Metric_MetricType } from "@buf/blacksmith_vm-agent.bufbuild_es/
|
|||
|
||||
// Configure base axios instance for Blacksmith API.
|
||||
const createBlacksmithAPIClient = () => {
|
||||
const apiUrl = process.env.BLACKSMITH_ENV?.includes('staging')
|
||||
? 'https://stagingapi.blacksmith.sh'
|
||||
: 'https://api.blacksmith.sh';
|
||||
const apiUrl = process.env.BLACKSMITH_BACKEND_URL || (
|
||||
process.env.BLACKSMITH_ENV?.includes('staging')
|
||||
? 'https://stagingapi.blacksmith.sh'
|
||||
: 'https://api.blacksmith.sh'
|
||||
);
|
||||
|
||||
const client = axios.create({
|
||||
baseURL: apiUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue