Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v15] Fix Machine ID Onboarding UI #45410

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,39 +92,39 @@ export function getWorkflowExampleYaml(
includeNameComment: boolean = true
): string {
return `on:
push:
branches:
- main
push:
branches:
- main
jobs:
demo:
permissions:
# The "id-token: write" permission is required or Machine ID will not be
# able to authenticate with the cluster.
id-token: write
contents: read
${includeNameComment && '# if you added a workflow name in the previous step, make sure you use the same value here'}
name: ${botName}-example
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fetch Teleport binaries
uses: teleport-actions/setup@v1
with:
version: ${version}
# server access example
- name: Fetch credentials using Machine ID
id: auth
uses: teleport-actions/auth@v2
with:
proxy: ${proxyAddr}
token: ${tokenName}
# Enable the submission of anonymous usage telemetry. This
# helps us shape the future development of \`tbot\`. You can disable this
# by omitting this.
anonymous-telemetry: 1
- name: List nodes (tsh)
# Enters a command from the cluster, in this case "tsh ls" using Machine
# ID credentials to list remote SSH nodes.
run: tsh ls`;
demo:
permissions:
# The "id-token: write" permission is required or Machine ID will not be
# able to authenticate with the cluster.
id-token: write
contents: read
${includeNameComment && '# if you added a workflow name in the previous step, make sure you use the same value here'}
name: ${botName}-example
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fetch Teleport binaries
uses: teleport-actions/setup@v1
with:
version: ${version}
# server access example
- name: Fetch credentials using Machine ID
id: auth
uses: teleport-actions/auth@v2
with:
proxy: ${proxyAddr}
token: ${tokenName}
# Enable the submission of anonymous usage telemetry. This
# helps us shape the future development of \`tbot\`. You can disable this
# by omitting this.
anonymous-telemetry: 1
- name: List nodes (tsh)
# Enters a command from the cluster, in this case "tsh ls" using Machine
# ID credentials to list remote SSH nodes.
run: tsh ls`;
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export function GitHubFlowProvider({
},
}).then(token => {
setTokenName(token.id);
return serviceCreateBot(createBotRequest);
return serviceCreateBot({
...createBotRequest,
roles: [createBotRequest.botName],
});
});
})
);
Expand Down
Loading