Skip to content

Commit

Permalink
Support GHES. Fixes #3
Browse files Browse the repository at this point in the history
Support GHES by using GITHUB_API_URL instead of hardcoded url
  • Loading branch information
rajbos authored Aug 18, 2021
1 parent 20142a0 commit 1f55be1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
*/
const axios = require('axios')
const path = require('path')
const BASE_URL = 'https://api.github.com'
const core = require('@actions/core')

async function upload(
base64Content,
{ Authorization, remotePath, username, repo, commitMessage }
) {

// load api url from context
let BASE_URL = process.env.GITHUB_API_URL
core.debug(`Using API url: ${BASE_URL}`)

const url =
BASE_URL +
Expand Down

0 comments on commit 1f55be1

Please sign in to comment.