Skip to content

Commit 1313cd4

Browse files
committed
Added slack hook url secret for publishing messages after github action runs.
1 parent f4b23e5 commit 1313cd4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,11 @@ resource "github_repository_file" "readme" {
4040
commit_author = "Platform team"
4141
commit_email = "[email protected]"
4242
overwrite_on_create = true
43+
}
44+
45+
resource "github_actions_environment_secret" "slack_hook_url" {
46+
repository = github_repository.gh_repo.name
47+
environment = "github-pages"
48+
secret_name = "SLACK_HOOK_URL"
49+
plaintext_value = var.slack_hook_url
4350
}

variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ variable "gh_token" {
2222
description = "Github token with permissions to create and delete repos."
2323
}
2424

25+
variable "slack_hook_url" {
26+
description = "The Slack webhook URL for publishing messages."
27+
}
28+
2529
variable "waypoint_project" {
2630
type = string
2731
description = "Name of the Waypoint project."

0 commit comments

Comments
 (0)