-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get github token from bjerk-bot stack reference (#81)
* feat: get github token from bjerk-bot stack * fix: add githubProvider to other github actions secrets * feat: use githubProvider everywhere * fix: get token from stackref, not through provider * fix: remove unused import * fix: update import * fix: update imports and stack refs * fix: remove unnecessary provider * refactor: use gitHub instead of github * feat: add stack refs to bjerk-conf * fix: remove extraneous provider reference * fix: remove unused export * fix: revert irrelevant change * revert format change * refactor: move stack-refs into resources folder * refactor: rename token in import * fix: use correct quotes * fix: use singlequotes * fix: use all lowercase stack refs * fix: set temporary local github token * fix: add config * move away from stackref folder * move out of stack ref * fix: revert temp token testing * fix: remove unnecessary import * disable default providers * change github token name * remove default provider * do not refresh for a second * fix token name * fix token name --------- Co-authored-by: Simen A. W. Olsen <so@bjerk.io>
- Loading branch information
1 parent
142a8fe
commit 27b6ec4
Showing
11 changed files
with
20 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
config: | ||
bjerk-conf:github-token: | ||
secure: AAABAPHVya0OAwni/3n8vb9t92GR3dwAWHbXAPMppk+ZGMq3osCn2bWpX0eEyAhMi0ZTvpp6F9ucDj48EzIJw8MfsI5V35ya | ||
bjerk-conf:github-token-expires-at: "2023-07-30T09:21:37.869Z" | ||
bjerk-conf:github-token-id: | ||
secure: AAABAKVO5zlOw54bufDPNBpYJl14X+EeC3z8ArADGs6qkPRF1rqQFzrr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as pulumi from '@pulumi/pulumi'; | ||
|
||
const bjerkBot = new pulumi.StackReference('bjerk/bjerk-bot/prod'); | ||
|
||
export const bjerkBotGitHubToken = pulumi.secret( | ||
bjerkBot.requireOutput('githubToken'), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import * as github from '@pulumi/github'; | ||
import { gitHubToken } from './stack-refs'; | ||
import { bjerkBotGitHubToken } from './stack-refs'; | ||
|
||
export const githubProvider = new github.Provider('gh-provider', { | ||
owner: 'bjerkio', | ||
token: gitHubToken, | ||
token: bjerkBotGitHubToken, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import './zones/bjerk-dev'; | ||
import './zones/bjerk-io'; | ||
import './deploy-service-account'; | ||
import './github'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import * as pulumi from '@pulumi/pulumi'; | ||
|
||
const bjerkConf = new pulumi.StackReference('Bjerk/bjerk-conf/prod'); | ||
const bjerkBotStack = new pulumi.StackReference('Bjerk/bjerk-bot/prod'); | ||
|
||
export const gitHubToken = pulumi.secret( | ||
bjerkConf.requireOutput('gitHubToken'), | ||
export const bjerkBotGitHubToken = pulumi.secret( | ||
bjerkBotStack.requireOutput('githubToken'), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import * as github from '@pulumi/github'; | ||
import { gitHubToken } from '../stack-refs'; | ||
import { bjerkBotGitHubToken } from '../stack-refs'; | ||
|
||
export const provider = new github.Provider('github-provider', { | ||
token: gitHubToken, | ||
token: bjerkBotGitHubToken, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import * as pulumi from '@pulumi/pulumi'; | ||
|
||
const bjerkConf = new pulumi.StackReference('Bjerk/bjerk-conf/prod'); | ||
const bjerkBot = new pulumi.StackReference('bjerk/bjerk-bot/prod'); | ||
|
||
export const gitHubToken = pulumi.secret( | ||
bjerkConf.requireOutput('gitHubToken'), | ||
export const bjerkBotGitHubToken = pulumi.secret( | ||
bjerkBot.requireOutput('githubToken'), | ||
); |