Skip to content

Commit 2eaa0aa

Browse files
fixing git-release step (#562)
1 parent 1bd50eb commit 2eaa0aa

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

incubating/github-release/run.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ REQUIRED_VARS=(
2020
)
2121

2222
OPTIONAL_VARS=(
23+
GIT_TOKEN
2324
RELEASE_DESCRIPTION
2425
FILES
2526
DRAFT
@@ -59,8 +60,11 @@ function checkTrigger() {
5960
}
6061

6162
function setDefaultVarValues() {
62-
if [ ! -z "$GITHUB_TOKEN" ]; then
63-
GIT_CONTEXT="_" # This is irrelevant, we are using GITHUB_TOKEN
63+
if [ ! -z "$GIT_TOKEN" ]; then
64+
bold "Using git token for authentication..."
65+
GIT_CONTEXT="_" # This is irrelevant, we are using git_token method
66+
GITHUB_TOKEN="$GIT_TOKEN"
67+
export GITHUB_TOKEN
6468
fi
6569

6670
if [ -z "$GIT_CONTEXT" ]; then

incubating/github-release/step.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '1.0'
33
metadata:
44
name: github-release
55
title: Create a GitHub release
6-
version: 1.1.6
6+
version: 1.1.7
77
isPublic: true
88
description: Create a GitHub release.
99
sources:
@@ -160,7 +160,7 @@ spec:
160160
image: codefresh/github-release
161161
environment:
162162
- 'GIT_CONTEXT=${{git_context_name}}'
163-
- 'GITHUB_TOKEN=${{git_token}}'
163+
- 'GIT_TOKEN=${{git_token}}'
164164
- 'CF_BRANCH_TAG_NORMALIZED=${{CF_BRANCH_TAG_NORMALIZED}}'
165165
- 'CF_REPO_OWNER=${{CF_REPO_OWNER}}'
166166
- 'CF_REPO_NAME=${{CF_REPO_NAME}}'

0 commit comments

Comments
 (0)