From b133411eee83731698ec5680f83b222eabd06021 Mon Sep 17 00:00:00 2001 From: Byron Ruth Date: Tue, 17 Oct 2023 09:48:25 -0400 Subject: [PATCH 1/2] Add windows CI and fix image tag Signed-off-by: Byron Ruth --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++++ cmd/nbe/docker.go | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 530062be..afdd822f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,3 +79,30 @@ jobs: vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} scope: ${{ secrets.VERCEL_TEAM_SCOPE }} working-directory: ./html + + windows: + name: Windows + matrix: + os: [windows-2019, windows-2022] + + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version-file: cmd/nbe/go.mod + cache-dependency-path: cmd/nbe/go.sum + cache: true + + - name: Build nbe + run: | + go install ./cmd/nbe + + - name: Test example + run: | + nbe run examples\messaging\pub-sub\go diff --git a/cmd/nbe/docker.go b/cmd/nbe/docker.go index 1c533349..d44a4601 100644 --- a/cmd/nbe/docker.go +++ b/cmd/nbe/docker.go @@ -125,7 +125,7 @@ func (r *ImageBuilder) Run() (string, error) { uid = uuid.New().String()[:8] } - imageTag := fmt.Sprintf("%s:%s", filepath.Join("nbe", r.Example), uid) + imageTag := strings.Replace(fmt.Sprintf("%s:%s", filepath.Join("nbe", r.Example), uid), "/", "-", -1) defaultDir := filepath.Join(r.Repo, "docker", lang) From 5b90f480786b6ad1c2ac0ed2ab6fa8c05ef63211 Mon Sep 17 00:00:00 2001 From: Byron Ruth Date: Tue, 17 Oct 2023 09:52:50 -0400 Subject: [PATCH 2/2] Fix action file Signed-off-by: Byron Ruth --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index afdd822f..993355cb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -82,8 +82,9 @@ jobs: windows: name: Windows - matrix: - os: [windows-2019, windows-2022] + strategy: + matrix: + os: [windows-2019, windows-2022] runs-on: ${{ matrix.os }} steps: