From f62bcf101f1dad2d8b0781340c161365514e8cc9 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Wed, 22 Feb 2023 22:40:12 +0000 Subject: [PATCH] docs: Add README.md to the Stack --- README.md | 1 + main.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f7351a --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# The Flow Platform diff --git a/main.go b/main.go index 5bc0599..a30e977 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "os" "strconv" "github.com/pulumi/pulumi-linode/sdk/v3/go/linode" @@ -44,6 +45,10 @@ func infra(ctx *pulumi.Context) error { return fmt.Errorf("unable to manage the volumes; %w", err) } + if err := readme(ctx); err != nil { + return fmt.Errorf("unable to add the README to the Stack; %w", err) + } + return nil } @@ -171,3 +176,14 @@ func volumes(ctx *pulumi.Context, cfg *platform, instanceID int) error { return nil } + +func readme(ctx *pulumi.Context) error { + readmeData, err := os.ReadFile("./README.md") + if err != nil { + return fmt.Errorf("unable to read README.md; %w", err) + } + + ctx.Export("readme", pulumi.String(string(readmeData))) + + return nil +}