GeezerVison is showing github.com — chore: remove gh role from infra · flcs/opencode@4862c3e
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: infra/stage.ts -43Lines changed: 0 additions & 43 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,49 +9,6 @@ export const zoneID = "430ba34c138cfb5360826c4909f99be8" | 9 | 9 | export const awsStage = $app.stage === "production" ? "production" : "dev" | 10 | 10 | export const deployAws = $app.stage === awsStage | 11 | 11 |
| 12 | | -const githubActionsDeployRole = (() => { | 13 | | - if ($app.stage !== "dev" && $app.stage !== "production") return | 14 | | - | 15 | | - const provider = new aws.iam.OpenIdConnectProvider("GithubActionsOidcProvider", { | 16 | | - url: "https://token.actions.githubusercontent.com", | 17 | | - clientIdLists: ["sts.amazonaws.com"], | 18 | | - }) | 19 | | - const role = new aws.iam.Role("GithubActionsDeployRole", { | 20 | | - name: `opencode-${$app.stage}-github-actions-deploy`, | 21 | | - maxSessionDuration: 3600, | 22 | | - assumeRolePolicy: aws.iam.getPolicyDocumentOutput({ | 23 | | - statements: [ | 24 | | - { | 25 | | - effect: "Allow", | 26 | | - actions: ["sts:AssumeRoleWithWebIdentity"], | 27 | | - principals: [{ type: "Federated", identifiers: [provider.arn] }], | 28 | | - conditions: [ | 29 | | - { | 30 | | - test: "StringEquals", | 31 | | - variable: "token.actions.githubusercontent.com:aud", | 32 | | - values: ["sts.amazonaws.com"], | 33 | | - }, | 34 | | - { | 35 | | - test: "StringEquals", | 36 | | - variable: "token.actions.githubusercontent.com:sub", | 37 | | - values: [`repo:anomalyco/opencode:environment:${$app.stage}`], | 38 | | - }, | 39 | | - ], | 40 | | - }, | 41 | | - ], | 42 | | - }).json, | 43 | | - }) | 44 | | - | 45 | | - new aws.iam.RolePolicyAttachment("GithubActionsDeployRoleAdmin", { | 46 | | - role: role.name, | 47 | | - policyArn: "arn:aws:iam::aws:policy/AdministratorAccess", | 48 | | - }) | 49 | | - | 50 | | - return role | 51 | | -})() | 52 | | - | 53 | | -export const githubActionsDeployRoleArn = githubActionsDeployRole?.arn | 54 | | - | 55 | 12 | new cloudflare.RegionalHostname("RegionalHostname", { | 56 | 13 | hostname: domain, | 57 | 14 | regionKey: "us", | |
Collapse file Copy file name to clipboardExpand all lines: sst.config.ts -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -51,7 +51,6 @@ export default $config({ | 51 | 51 | StatWorkerUrl: stat.url, | 52 | 52 | // StatsUrl: stats.app.url, | 53 | 53 | AwsStage: stage.awsStage, | 54 | | - ...(stage.githubActionsDeployRoleArn ? { GithubActionsDeployRoleArn: stage.githubActionsDeployRoleArn } : {}), | 55 | 54 | } | 56 | 55 | }, | 57 | 56 | }) |
|