Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit c8a1fb0

Browse files
authored
Merge pull request #2312 from atom/aw/schema-update
Push using GITHUB_ACTOR and GITHUB_TOKEN
2 parents bb0ab6f + 1bbfbd9 commit c8a1fb0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
schedule:
3-
- cron: 0 1 * * 4
3+
- cron: 0 1 * * 5
44
name: GraphQL schema update
55
jobs:
66
updateSchema:

actions/schema-up/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ Toolkit.run(async tools => {
6565
if (hasRelayChanges !== 0 && !relayFailed) {
6666
await tools.runInWorkspace('git', ['commit', '--all', '--message', ':gear: relay-compiler changes']);
6767
}
68-
await tools.runInWorkspace('git', ['push', 'origin', branchName]);
68+
69+
const actor = process.env.GITHUB_ACTOR;
70+
const token = process.env.GITHUB_TOKEN;
71+
const repository = process.env.GITHUB_REPOSITORY;
72+
73+
await tools.runInWorkspace('git', ['push', `https://${actor}:${token}@github.com/${repository}.git`, branchName]);
6974

7075
tools.log.info('Creating a pull request.');
7176

0 commit comments

Comments
 (0)