GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: remove gh role from infra · flcs/opencode@4862c3e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • infra
    • stage.ts
  • sst.config.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎infra/stage.ts‎

Copy file name to clipboardExpand all lines: infra/stage.ts
-43Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,6 @@ export const zoneID = "430ba34c138cfb5360826c4909f99be8"
99
export const awsStage = $app.stage === "production" ? "production" : "dev"
1010
export const deployAws = $app.stage === awsStage
1111

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-
5512
new cloudflare.RegionalHostname("RegionalHostname", {
5613
hostname: domain,
5714
regionKey: "us",
Collapse file

‎sst.config.ts‎

Copy file name to clipboardExpand all lines: sst.config.ts
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export default $config({
5151
StatWorkerUrl: stat.url,
5252
// StatsUrl: stats.app.url,
5353
AwsStage: stage.awsStage,
54-
...(stage.githubActionsDeployRoleArn ? { GithubActionsDeployRoleArn: stage.githubActionsDeployRoleArn } : {}),
5554
}
5655
},
5756
})

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.