From 1d9d1e3a10d8c732bb6724689ada4c5a30809782 Mon Sep 17 00:00:00 2001 From: jrhizor Date: Sun, 19 Feb 2023 23:57:04 -0800 Subject: [PATCH 1/3] add stoat --- .github/workflows/codeql-analysis.yml | 5 +++++ .stoat/config.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .stoat/config.yaml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 95fed5971..efeb7cfec 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -28,3 +28,8 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + + - name: Run Stoat Action + uses: stoat-dev/stoat-action@v0 + if: always() + diff --git a/.stoat/config.yaml b/.stoat/config.yaml new file mode 100644 index 000000000..43bd5cd56 --- /dev/null +++ b/.stoat/config.yaml @@ -0,0 +1,11 @@ +--- +version: 1 +enabled: true +plugins: + job_runtime: + enabled: true +# static_hosting: +# your_unique_id: +# metadata: +# name: "Name of artifact you're hosting, such as Code Coverage Report" +# path: path/from/git/root/to/directory/to/host From 7db4a07147f347756e9a767c173bc16d5542c108 Mon Sep 17 00:00:00 2001 From: jrhizor Date: Sun, 19 Feb 2023 23:57:24 -0800 Subject: [PATCH 2/3] add logs and blog posts --- nginx-golang-postgres/backend/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nginx-golang-postgres/backend/main.go b/nginx-golang-postgres/backend/main.go index 7ed5f37c5..b01c6384d 100755 --- a/nginx-golang-postgres/backend/main.go +++ b/nginx-golang-postgres/backend/main.go @@ -79,7 +79,8 @@ func prepare() error { return err } - for i := 0; i < 5; i++ { + for i := 0; i < 10; i++ { + log.Print(fmt.Sprintf("Inserting post #%d", i)) if _, err := db.Exec("INSERT INTO blog (title) VALUES ($1);", fmt.Sprintf("Blog post #%d", i)); err != nil { return err } From ef667563be703de2c5a02941c919ab75e8dd135c Mon Sep 17 00:00:00 2001 From: jrhizor Date: Mon, 20 Feb 2023 00:05:47 -0800 Subject: [PATCH 3/3] add comment --- .github/workflows/build.yml | 17 +++++++++++++++++ .stoat/comment.hbs | 1 + .stoat/config.yaml | 8 ++------ 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .stoat/comment.hbs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..7ddabb495 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: "Build" + +on: + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run Stoat Action + uses: stoat-dev/stoat-action@v0 + if: always() diff --git a/.stoat/comment.hbs b/.stoat/comment.hbs new file mode 100644 index 000000000..b25c75c02 --- /dev/null +++ b/.stoat/comment.hbs @@ -0,0 +1 @@ +[![preview docker compose](https://shields.io/badge/stoat-docker%20compose-green?&style=flat)](https://stoat-git-jrhizor-kube-demo-stoat-dev.vercel.app/app/diffs) diff --git a/.stoat/config.yaml b/.stoat/config.yaml index 43bd5cd56..965e7cc9b 100644 --- a/.stoat/config.yaml +++ b/.stoat/config.yaml @@ -1,11 +1,7 @@ --- version: 1 enabled: true +comment_template_file: ".stoat/comment.hbs" plugins: job_runtime: - enabled: true -# static_hosting: -# your_unique_id: -# metadata: -# name: "Name of artifact you're hosting, such as Code Coverage Report" -# path: path/from/git/root/to/directory/to/host + enabled: false