Skip to content

Commit

Permalink
Merge pull request #29 from iLem0n/master
Browse files Browse the repository at this point in the history
Enable GHE
  • Loading branch information
stefanprodan committed Feb 14, 2022
2 parents 12f5926 + 3baf78a commit 83569ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Inputs:
* `app_version` Explicitly specify app version in package. If not defined then used chart values.
* `chart_version` Explicitly specify chart version in package. If not defined then used chart values.
* `index_dir` The location of `index.yaml` file in the repo, defaults to the same value as `target_dir`
* `enterprise_url` The URL of enterprise github server in the format `<server-url>/<organisation>`

## Examples

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ inputs:
index_dir:
description: "The location of `index.yaml` file in the repo, defaults to the same value as `target_dir`"
required: false
enterprise_url:
description: "The URL of enterprise github server in the format '<server-url>/<organisation>'"
required: false
runs:
using: 'docker'
image: 'Dockerfile'
Expand All @@ -67,3 +70,4 @@ runs:
- ${{ inputs.app_version }}
- ${{ inputs.chart_version }}
- ${{ inputs.index_dir }}
- ${{ inputs.enterprise_url }}
7 changes: 6 additions & 1 deletion src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ COMMIT_EMAIL=${11}
APP_VERSION=${12}
CHART_VERSION=${13}
INDEX_DIR=${14}
ENTERPRISE_URL=${15}

CHARTS=()
CHARTS_TMP_DIR=$(mktemp -d)
Expand Down Expand Up @@ -71,7 +72,11 @@ main() {
fi

if [[ -z "$REPO_URL" ]]; then
REPO_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/${OWNER}/${REPOSITORY}"
if [[ -z "$ENTERPRISE_URL" ]]; then
REPO_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/${OWNER}/${REPOSITORY}"
else
REPO_URL="https://x-access-token:${GITHUB_TOKEN}@${ENTERPRISE_URL}/${REPOSITORY}"
fi
fi

if [[ -z "$COMMIT_USERNAME" ]]; then
Expand Down

0 comments on commit 83569ee

Please sign in to comment.