[FAST] Housekeeping in CICD workflow templates and extra stage (#2412)

* Sync GitHub workflow template in assets with rest of the repo

* Remove trailing whitespace in 1-tenant-factory GitHub workflow template

* Update actions/github-script version as per NodeJS deprecation warnings

* Remove redundant Source Repo templates given #2352

* Update gh file content to handle base64 png in line with #2286

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
Jay Bana
2024-07-08 13:40:32 +01:00
committed by GitHub
parent 8149e6e669
commit a514ce0ef5
9 changed files with 14 additions and 405 deletions

View File

@@ -18,6 +18,7 @@ locals {
_repository_files = flatten([
for k, v in var.repositories : [
for f in concat(
[for f in fileset(path.module, "${v.populate_from}/*.png") : f],
[for f in fileset(path.module, "${v.populate_from}/*.svg") : f],
[for f in fileset(path.module, "${v.populate_from}/*.md") : f],
(v.populate_samples ? [for f in fileset(path.module, "${v.populate_from}/*.sample") : f] : []),
@@ -167,7 +168,7 @@ resource "github_repository_file" "default" {
"/source(\\s*)=\\s*\"../../../modules/([^/\"]+)\"/",
"source$1= \"git@github.com:${local.modules_repo}.git//${local.module_prefix}$2${local.modules_ref}\"" # "
)
: file(each.value.file)
: try(file(each.value.file), filebase64(each.value.file))
)
commit_message = "${var.commit_config.message} (${each.value.name})"
commit_author = var.commit_config.author