From e422ad64a9b59c7aa161ef14930fee692ac1e975 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 20 Jul 2022 16:52:43 +0000 Subject: [PATCH 01/21] test change --- .github/workflows/coder.yaml | 3 +++ docs/secrets.md | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 90f6dee753cf4..d530a3dba707f 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -10,6 +10,9 @@ on: - "docs/**" pull_request: + paths-ignore: + - "docs/**" + - ".github/**" workflow_dispatch: diff --git a/docs/secrets.md b/docs/secrets.md index 6cb4003cc74b9..96ef8d653ab9b 100644 --- a/docs/secrets.md +++ b/docs/secrets.md @@ -1,5 +1,7 @@ # Secrets +Blah blah... +
This article explains how to use secrets in a workspace. To authenticate the workspace provisioner, see this. From c88149147590e5f94494ef4a6e6f2b9534eb15c5 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 20 Jul 2022 17:14:57 +0000 Subject: [PATCH 02/21] Revert to old docs method --- .github/workflows/coder.yaml | 32 +++++++++++++++---- cli/ssh_test.go | 6 ---- docs/secrets.md | 2 -- go.mod | 2 +- go.sum | 4 +-- .../WorkspaceScheduleForm.tsx | 2 +- 6 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index d530a3dba707f..57d38a1f21517 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -6,13 +6,8 @@ on: - main tags: - "*" - paths-ignore: - - "docs/**" pull_request: - paths-ignore: - - "docs/**" - - ".github/**" workflow_dispatch: @@ -35,9 +30,25 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: + changes: + runs-on: ubuntu-latest + outputs: + docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} + steps: + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + all: + - '**' + docs: + - 'docs/**' + - '.github/**' style-lint-golangci: name: style/lint/golangci timeout-minutes: 5 + if: ${{ !needs.changes.outputs.docs_only }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -53,6 +64,7 @@ jobs: name: style/lint/shellcheck timeout-minutes: 5 runs-on: ubuntu-latest + if: ${{ !needs.changes.outputs.docs_only }} steps: - uses: actions/checkout@v3 - name: Run ShellCheck @@ -65,6 +77,7 @@ jobs: style-lint-typescript: name: "style/lint/typescript" timeout-minutes: 5 + if: ${{ !needs.changes.outputs.docs_only }} runs-on: ubuntu-latest steps: - name: Checkout @@ -92,6 +105,7 @@ jobs: name: "style/gen" timeout-minutes: 5 runs-on: ubuntu-latest + if: ${{ !needs.changes.outputs.docs_only }} steps: - uses: actions/checkout@v3 @@ -127,6 +141,7 @@ jobs: style-fmt: name: "style/fmt" + if: ${{ !needs.changes.outputs.docs_only }} runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -159,6 +174,7 @@ jobs: test-go: name: "test/go" + if: ${{ !needs.changes.outputs.docs_only }} runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: @@ -235,6 +251,7 @@ jobs: test-go-postgres: name: "test/go/postgres" + if: ${{ !needs.changes.outputs.docs_only }} runs-on: ubuntu-latest # This timeout must be greater than the timeout set by `go test` in # `make test-postgres` to ensure we receive a trace of running @@ -306,7 +323,9 @@ jobs: name: "deploy" runs-on: ubuntu-latest timeout-minutes: 30 - if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork + if: | + github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork + && !needs.changes.outputs.docs_only permissions: contents: read id-token: write @@ -412,6 +431,7 @@ jobs: test-js: name: "test/js" + if: ${{ !needs.changes.outputs.docs_only }} runs-on: ubuntu-latest timeout-minutes: 20 steps: diff --git a/cli/ssh_test.go b/cli/ssh_test.go index c5849e99eada6..171907ee06155 100644 --- a/cli/ssh_test.go +++ b/cli/ssh_test.go @@ -91,9 +91,6 @@ func TestSSH(t *testing.T) { // Shells on Mac, Windows, and Linux all exit shells with the "exit" command. pty.WriteLine("exit") - // Read output to prevent hang on macOS, see: - // https://github.com/coder/coder/issues/2122 - pty.ExpectMatch("exit") <-cmdDone }) t.Run("Stdio", func(t *testing.T) { @@ -227,9 +224,6 @@ func TestSSH(t *testing.T) { // And we're done. pty.WriteLine("exit") - // Read output to prevent hang on macOS, see: - // https://github.com/coder/coder/issues/2122 - pty.ExpectMatch("exit") <-cmdDone }) } diff --git a/docs/secrets.md b/docs/secrets.md index 96ef8d653ab9b..6cb4003cc74b9 100644 --- a/docs/secrets.md +++ b/docs/secrets.md @@ -1,7 +1,5 @@ # Secrets -Blah blah... -
This article explains how to use secrets in a workspace. To authenticate the workspace provisioner, see this. diff --git a/go.mod b/go.mod index c33a634b4d002..d4127b654bf52 100644 --- a/go.mod +++ b/go.mod @@ -243,7 +243,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/afero v1.9.2 + github.com/spf13/afero v1.9.0 github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect diff --git a/go.sum b/go.sum index a686a4fd703ae..96e6df7e5201e 100644 --- a/go.sum +++ b/go.sum @@ -1699,8 +1699,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.0 h1:sFSLUHgxdnN32Qy38hK3QkYBFXZj9DKjVjCUCtD7juY= +github.com/spf13/afero v1.9.0/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= diff --git a/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx b/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx index 7b9905cced32d..6cb8364956cd2 100644 --- a/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx +++ b/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx @@ -33,7 +33,7 @@ dayjs.extend(timezone) export const Language = { errorNoDayOfWeek: "Must set at least one day of week if start time is set", - errorNoTime: "Start time is required when days of the week are selected", + errorNoTime: "Start time is required", errorTime: "Time must be in HH:mm format (24 hours)", errorTimezone: "Invalid timezone", daysOfWeekLabel: "Days of Week", From e9d7fa2b6de05a1aa2e01f2673a4662db6b3236c Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 20 Jul 2022 17:23:04 +0000 Subject: [PATCH 03/21] add needs --- .github/workflows/coder.yaml | 36 +++++++++++++------ cli/ssh_test.go | 6 ++++ go.mod | 2 +- go.sum | 4 +-- .../WorkspaceScheduleForm.tsx | 2 +- 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 57d38a1f21517..82c06b64c4856 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -33,7 +33,7 @@ jobs: changes: runs-on: ubuntu-latest outputs: - docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} + docs-only: ${{ env.DOCS_ONLY }} steps: # For pull requests it's not necessary to checkout the code - uses: dorny/paths-filter@v2 @@ -44,11 +44,15 @@ jobs: - '**' docs: - 'docs/**' - - '.github/**' + - id: log + run: | + echo "${{ toJSON(steps.filter) }}" + echo "DOCS_ONLY=${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} >> $GITHUB_ENV" style-lint-golangci: name: style/lint/golangci timeout-minutes: 5 - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -64,7 +68,8 @@ jobs: name: style/lint/shellcheck timeout-minutes: 5 runs-on: ubuntu-latest - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' steps: - uses: actions/checkout@v3 - name: Run ShellCheck @@ -77,7 +82,8 @@ jobs: style-lint-typescript: name: "style/lint/typescript" timeout-minutes: 5 - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ubuntu-latest steps: - name: Checkout @@ -105,7 +111,8 @@ jobs: name: "style/gen" timeout-minutes: 5 runs-on: ubuntu-latest - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' steps: - uses: actions/checkout@v3 @@ -141,7 +148,8 @@ jobs: style-fmt: name: "style/fmt" - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -174,7 +182,8 @@ jobs: test-go: name: "test/go" - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: @@ -251,7 +260,8 @@ jobs: test-go-postgres: name: "test/go/postgres" - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ubuntu-latest # This timeout must be greater than the timeout set by `go test` in # `make test-postgres` to ensure we receive a trace of running @@ -323,9 +333,10 @@ jobs: name: "deploy" runs-on: ubuntu-latest timeout-minutes: 30 + needs: changes if: | github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork - && !needs.changes.outputs.docs_only + && needs.changes.outputs.docs_only == 'false' permissions: contents: read id-token: write @@ -431,7 +442,8 @@ jobs: test-js: name: "test/js" - if: ${{ !needs.changes.outputs.docs_only }} + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -485,6 +497,8 @@ jobs: test-e2e: name: "test/e2e/${{ matrix.os }}" + needs: changes + if: needs.changes.outputs.docs_only == 'false' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: diff --git a/cli/ssh_test.go b/cli/ssh_test.go index 171907ee06155..c5849e99eada6 100644 --- a/cli/ssh_test.go +++ b/cli/ssh_test.go @@ -91,6 +91,9 @@ func TestSSH(t *testing.T) { // Shells on Mac, Windows, and Linux all exit shells with the "exit" command. pty.WriteLine("exit") + // Read output to prevent hang on macOS, see: + // https://github.com/coder/coder/issues/2122 + pty.ExpectMatch("exit") <-cmdDone }) t.Run("Stdio", func(t *testing.T) { @@ -224,6 +227,9 @@ func TestSSH(t *testing.T) { // And we're done. pty.WriteLine("exit") + // Read output to prevent hang on macOS, see: + // https://github.com/coder/coder/issues/2122 + pty.ExpectMatch("exit") <-cmdDone }) } diff --git a/go.mod b/go.mod index d4127b654bf52..c33a634b4d002 100644 --- a/go.mod +++ b/go.mod @@ -243,7 +243,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/afero v1.9.0 + github.com/spf13/afero v1.9.2 github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect diff --git a/go.sum b/go.sum index 96e6df7e5201e..a686a4fd703ae 100644 --- a/go.sum +++ b/go.sum @@ -1699,8 +1699,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.0 h1:sFSLUHgxdnN32Qy38hK3QkYBFXZj9DKjVjCUCtD7juY= -github.com/spf13/afero v1.9.0/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= diff --git a/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx b/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx index 6cb8364956cd2..7b9905cced32d 100644 --- a/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx +++ b/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx @@ -33,7 +33,7 @@ dayjs.extend(timezone) export const Language = { errorNoDayOfWeek: "Must set at least one day of week if start time is set", - errorNoTime: "Start time is required", + errorNoTime: "Start time is required when days of the week are selected", errorTime: "Time must be in HH:mm format (24 hours)", errorTimezone: "Invalid timezone", daysOfWeekLabel: "Days of Week", From d406a36933857d05a26632a38c329e3ab2bde00b Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 20:45:44 +0000 Subject: [PATCH 04/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 82c06b64c4856..e9dec5c94be42 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -52,7 +52,7 @@ jobs: name: style/lint/golangci timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs_only == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 2d354bb0ab1887936a35756bacc90202d13c56a7 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 20:46:39 +0000 Subject: [PATCH 05/21] fixup! add needs --- .github/workflows/coder.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index e9dec5c94be42..38e181b728c09 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -44,6 +44,8 @@ jobs: - '**' docs: - 'docs/**' + # For testing: + - '.github/**' - id: log run: | echo "${{ toJSON(steps.filter) }}" From e8c003a7f1130da70c6a2379373eb3352fd25a96 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 20:52:47 +0000 Subject: [PATCH 06/21] fixup! add needs --- .github/workflows/coder.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 38e181b728c09..6996d0479d318 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -33,7 +33,7 @@ jobs: changes: runs-on: ubuntu-latest outputs: - docs-only: ${{ env.DOCS_ONLY }} + docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} steps: # For pull requests it's not necessary to checkout the code - uses: dorny/paths-filter@v2 @@ -54,7 +54,7 @@ jobs: name: style/lint/golangci timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs_only == false + if: needs.changes.outputs.docs_only == 'false' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 60ef528151b8acde139e9c6355eb6cf3348d193a Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 20:53:48 +0000 Subject: [PATCH 07/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 6996d0479d318..008bddc460010 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -45,7 +45,7 @@ jobs: docs: - 'docs/**' # For testing: - - '.github/**' + # - '.github/**' - id: log run: | echo "${{ toJSON(steps.filter) }}" From 8dc413ae567037674297c498dbecfc90014be25a Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 20:54:29 +0000 Subject: [PATCH 08/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 008bddc460010..75e71bd5e3df7 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -54,7 +54,7 @@ jobs: name: style/lint/golangci timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs_only == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 446b675654dedb71b11d053350161b539ea4dc1f Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 20:55:08 +0000 Subject: [PATCH 09/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 75e71bd5e3df7..bf6c8108bd00b 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -45,7 +45,7 @@ jobs: docs: - 'docs/**' # For testing: - # - '.github/**' + - '.github/**' - id: log run: | echo "${{ toJSON(steps.filter) }}" From 0bacfc55e6be2a42a4fdc88a69fd64698064dd9d Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:01:41 +0000 Subject: [PATCH 10/21] fixup! add needs --- .github/workflows/coder.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index bf6c8108bd00b..6d95014f64116 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -50,6 +50,15 @@ jobs: run: | echo "${{ toJSON(steps.filter) }}" echo "DOCS_ONLY=${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} >> $GITHUB_ENV" + + show-changes: + needs: changes + runs-on: ubuntu-latest + steps: + - id: log + run: | + echo "${{ toJSON(changesj) }}" + style-lint-golangci: name: style/lint/golangci timeout-minutes: 5 From cb7d32bf0e8034d4cf847b386d4967a5170eb119 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:01:59 +0000 Subject: [PATCH 11/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 6d95014f64116..bfa5545c8ab1b 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -57,7 +57,7 @@ jobs: steps: - id: log run: | - echo "${{ toJSON(changesj) }}" + echo "${{ toJSON(changes) }}" style-lint-golangci: name: style/lint/golangci From 9590cac03f263342a3bbf848183b8c6cc0f21663 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:02:26 +0000 Subject: [PATCH 12/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index bfa5545c8ab1b..a9923e9d6c74e 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -57,7 +57,7 @@ jobs: steps: - id: log run: | - echo "${{ toJSON(changes) }}" + echo "${{ toJSON(needs.changes) }}" style-lint-golangci: name: style/lint/golangci From 206f7118ea1074b1e6b4011e7b82b2ed5b769c91 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:04:11 +0000 Subject: [PATCH 13/21] fixup! add needs --- .github/workflows/coder.yaml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index a9923e9d6c74e..ad74094bddc5f 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -46,11 +46,8 @@ jobs: - 'docs/**' # For testing: - '.github/**' - - id: log - run: | - echo "${{ toJSON(steps.filter) }}" - echo "DOCS_ONLY=${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} >> $GITHUB_ENV" + # Debug step show-changes: needs: changes runs-on: ubuntu-latest @@ -63,7 +60,7 @@ jobs: name: style/lint/golangci timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs_only == false + if: needs.changes.outputs.docs-only == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -80,7 +77,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' steps: - uses: actions/checkout@v3 - name: Run ShellCheck @@ -94,7 +91,7 @@ jobs: name: "style/lint/typescript" timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest steps: - name: Checkout @@ -123,7 +120,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' steps: - uses: actions/checkout@v3 @@ -160,7 +157,7 @@ jobs: style-fmt: name: "style/fmt" needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -194,7 +191,7 @@ jobs: test-go: name: "test/go" needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: @@ -272,7 +269,7 @@ jobs: test-go-postgres: name: "test/go/postgres" needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest # This timeout must be greater than the timeout set by `go test` in # `make test-postgres` to ensure we receive a trace of running @@ -347,7 +344,7 @@ jobs: needs: changes if: | github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork - && needs.changes.outputs.docs_only == 'false' + && needs.changes.outputs.docs-only == 'false' permissions: contents: read id-token: write @@ -454,7 +451,7 @@ jobs: test-js: name: "test/js" needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -509,7 +506,7 @@ jobs: test-e2e: name: "test/e2e/${{ matrix.os }}" needs: changes - if: needs.changes.outputs.docs_only == 'false' + if: needs.changes.outputs.docs-only == 'false' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: From b1f36672b021dfd888834c9e64db86e91f0192ad Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:04:54 +0000 Subject: [PATCH 14/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index ad74094bddc5f..6a30d0b1cf9fe 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -45,7 +45,7 @@ jobs: docs: - 'docs/**' # For testing: - - '.github/**' + # - '.github/**' # Debug step show-changes: From df092330e5034a3117779b9e13cd5ea7fbc0c85f Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:10:45 +0000 Subject: [PATCH 15/21] fixup! add needs --- .github/workflows/coder.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 6a30d0b1cf9fe..c1c1a76e0c49e 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -77,7 +77,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false steps: - uses: actions/checkout@v3 - name: Run ShellCheck @@ -91,7 +91,7 @@ jobs: name: "style/lint/typescript" timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false runs-on: ubuntu-latest steps: - name: Checkout @@ -120,7 +120,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false steps: - uses: actions/checkout@v3 @@ -157,7 +157,7 @@ jobs: style-fmt: name: "style/fmt" needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -191,7 +191,7 @@ jobs: test-go: name: "test/go" needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: @@ -269,7 +269,7 @@ jobs: test-go-postgres: name: "test/go/postgres" needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false runs-on: ubuntu-latest # This timeout must be greater than the timeout set by `go test` in # `make test-postgres` to ensure we receive a trace of running @@ -344,7 +344,7 @@ jobs: needs: changes if: | github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork - && needs.changes.outputs.docs-only == 'false' + && needs.changes.outputs.docs-only == false permissions: contents: read id-token: write @@ -451,7 +451,7 @@ jobs: test-js: name: "test/js" needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -506,7 +506,7 @@ jobs: test-e2e: name: "test/e2e/${{ matrix.os }}" needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.docs-only == false runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: From cd39c460355a13567cb8b8bab9090c2dfcff2f94 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:11:51 +0000 Subject: [PATCH 16/21] fixup! add needs --- .github/workflows/coder.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index c1c1a76e0c49e..2917285084dc6 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -46,6 +46,9 @@ jobs: - 'docs/**' # For testing: # - '.github/**' + - id: debug + run: | + echo "${{ toJSON(steps.filter )}}" # Debug step show-changes: From 25ce2bd14be1f2f8c896fd5846425f3561bd2347 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:12:23 +0000 Subject: [PATCH 17/21] fixup! add needs --- .github/workflows/coder.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 2917285084dc6..de3c1ace10265 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -46,9 +46,9 @@ jobs: - 'docs/**' # For testing: # - '.github/**' - - id: debug - run: | - echo "${{ toJSON(steps.filter )}}" + - id: debug + run: | + echo "${{ toJSON(steps.filter )}}" # Debug step show-changes: From 2fd15bdd9cc0b976c754c5de25a70471bc3ef9e5 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:15:33 +0000 Subject: [PATCH 18/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index de3c1ace10265..a1529ebfa187c 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -63,7 +63,7 @@ jobs: name: style/lint/golangci timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 11f07304542bda6b43801aa9d26bc397587809e9 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:16:16 +0000 Subject: [PATCH 19/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index a1529ebfa187c..beadb3089aa1e 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -45,7 +45,7 @@ jobs: docs: - 'docs/**' # For testing: - # - '.github/**' + - '.github/**' - id: debug run: | echo "${{ toJSON(steps.filter )}}" From 56a04621ae00e0e6d1252ac686fc5ef100a54d5d Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:23:14 +0000 Subject: [PATCH 20/21] fixup! add needs --- .github/workflows/coder.yaml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index beadb3089aa1e..8de463940e2ea 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -34,6 +34,8 @@ jobs: runs-on: ubuntu-latest outputs: docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} + go: ${{ steps.filter.outputs.go }} + sh: ${{ steps.filter.outputs.sh }} steps: # For pull requests it's not necessary to checkout the code - uses: dorny/paths-filter@v2 @@ -46,6 +48,12 @@ jobs: - 'docs/**' # For testing: - '.github/**' + go: + - "**.go" + - "**.mod" + - "**.sum" + sh: + - "**.sh" - id: debug run: | echo "${{ toJSON(steps.filter )}}" @@ -63,7 +71,7 @@ jobs: name: style/lint/golangci timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs-only == 'false' + if: needs.changes.outputs.go == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -80,7 +88,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.sh == 'true' steps: - uses: actions/checkout@v3 - name: Run ShellCheck @@ -94,7 +102,7 @@ jobs: name: "style/lint/typescript" timeout-minutes: 5 needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest steps: - name: Checkout @@ -123,7 +131,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' steps: - uses: actions/checkout@v3 @@ -160,7 +168,7 @@ jobs: style-fmt: name: "style/fmt" needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -194,7 +202,7 @@ jobs: test-go: name: "test/go" needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: @@ -272,7 +280,7 @@ jobs: test-go-postgres: name: "test/go/postgres" needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest # This timeout must be greater than the timeout set by `go test` in # `make test-postgres` to ensure we receive a trace of running @@ -347,7 +355,7 @@ jobs: needs: changes if: | github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork - && needs.changes.outputs.docs-only == false + && needs.changes.outputs.docs-only == 'false' permissions: contents: read id-token: write @@ -454,7 +462,7 @@ jobs: test-js: name: "test/js" needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -509,7 +517,7 @@ jobs: test-e2e: name: "test/e2e/${{ matrix.os }}" needs: changes - if: needs.changes.outputs.docs-only == false + if: needs.changes.outputs.docs-only == 'false' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: From aabb01e6ca9d5670fa38311589395b5557a5e9e9 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Sat, 23 Jul 2022 21:23:59 +0000 Subject: [PATCH 21/21] fixup! add needs --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 8de463940e2ea..cb775b8ff7932 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -47,7 +47,7 @@ jobs: docs: - 'docs/**' # For testing: - - '.github/**' + # - '.github/**' go: - "**.go" - "**.mod"