Skip to content

Commit 556ac03

Browse files
Use default GITHUB_ACTOR if unset (#3331)
Co-authored-by: Ivan Goncharov <[email protected]>
1 parent c2435fd commit 556ac03

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ jobs:
280280
- name: Deploy to `npm` branch
281281
run: npm run gitpublish:npm
282282
env:
283-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
283+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
284284

285285
deploy-to-deno-branch:
286286
name: Deploy to `deno` branch
@@ -316,4 +316,4 @@ jobs:
316316
- name: Deploy to `deno` branch
317317
run: npm run gitpublish:deno
318318
env:
319-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
319+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

resources/gitpublish.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,23 @@ if [ -z "${DIST_DIR}" ]; then
2323
exit 1;
2424
fi;
2525

26-
if [ -z "${GH_TOKEN}" ]; then
27-
echo 'Must provide GH_TOKEN as environment variable!'
26+
if [ -z "${GITHUB_TOKEN}" ]; then
27+
echo 'Must provide GITHUB_TOKEN as environment variable!'
2828
exit 1;
2929
fi;
3030

31+
if [ -z "${GITHUB_ACTOR}" ]; then
32+
echo 'Must provide GITHUB_ACTOR as environment variable!'
33+
fi;
34+
3135
if [ ! -d $DIST_DIR ]; then
3236
echo "Directory '${DIST_DIR}' does not exist!"
3337
exit 1;
3438
fi;
3539

3640
# Create empty directory
3741
rm -rf $BRANCH
38-
git clone -b $BRANCH -- "https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/graphql/graphql-js.git" $BRANCH
42+
git clone -b $BRANCH -- "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/graphql/graphql-js.git" $BRANCH
3943

4044
# Remove existing files first
4145
rm -rf $BRANCH/**/*

0 commit comments

Comments
 (0)