From 84c7d74305e4f7ee2529461c87120dec29dd5e20 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Dec 2025 16:50:40 +0000 Subject: [PATCH 1/5] Add copilot-setup-steps workflow for automated agent development Co-authored-by: HermanPlay <78978614+HermanPlay@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 00000000..5c2ec867 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,44 @@ +name: "Copilot Setup Steps" + +# Automatically run the setup steps when they are changed to allow for easy validation, and +# allow manual testing through the repository's "Actions" tab +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. + copilot-setup-steps: + runs-on: ubuntu-latest + + # Set the permissions to the lowest permissions possible needed for your steps. + # Copilot will be given its own token for its operations. + permissions: + # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete. + contents: read + + # You can define any steps you want, and they will run before the agent starts. + # If you do not check out your code, Copilot will do this for you. + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.24" + cache: true + + - name: Install Go dependencies + run: go mod tidy + + - name: Install golangci-lint + run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest + + - name: Install swag CLI tool + run: go install github.com/swaggo/swag/cmd/swag@latest From 86ad70f8404ed34c8c6804ce751308f523b71963 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Dec 2025 16:51:58 +0000 Subject: [PATCH 2/5] Use actions/checkout@v4 for consistency with other workflows Co-authored-by: HermanPlay <78978614+HermanPlay@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 5c2ec867..972e9e13 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -26,7 +26,7 @@ jobs: # If you do not check out your code, Copilot will do this for you. steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 From 0b0290d20d04b3251a8b102436a2806ff7d5ed51 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Dec 2025 16:58:44 +0000 Subject: [PATCH 3/5] Change runner to ubuntu-mini as requested Co-authored-by: HermanPlay <78978614+HermanPlay@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 972e9e13..36aa6fae 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -14,7 +14,7 @@ on: jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: - runs-on: ubuntu-latest + runs-on: ubuntu-mini # Set the permissions to the lowest permissions possible needed for your steps. # Copilot will be given its own token for its operations. From 0ed43045e9e3c6d39cba8e334ca2486c3d6d4233 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:35:27 +0000 Subject: [PATCH 4/5] Address review comments: use ubuntu-latest, go-version-file, mini-maxit/swag fork, and add caching Co-authored-by: HermanPlay <78978614+HermanPlay@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 24 ++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 36aa6fae..765565c7 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -14,7 +14,7 @@ on: jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: - runs-on: ubuntu-mini + runs-on: ubuntu-latest # Set the permissions to the lowest permissions possible needed for your steps. # Copilot will be given its own token for its operations. @@ -31,14 +31,32 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.24" + go-version-file: go.mod cache: true + - name: Cache Go modules + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Install Go dependencies run: go mod tidy + - name: Cache installed tools + uses: actions/cache@v4 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-tools-${{ hashFiles('.github/workflows/copilot-setup-steps.yml') }} + restore-keys: | + ${{ runner.os }}-go-tools- + - name: Install golangci-lint run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest - name: Install swag CLI tool - run: go install github.com/swaggo/swag/cmd/swag@latest + run: go install github.com/mini-maxit/swag/cmd/swag@latest From cd3f2af297a44aaa9465af577fe50a9b1ebf8bc4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:37:07 +0000 Subject: [PATCH 5/5] Remove redundant Go modules cache (already handled by setup-go with cache: true) Co-authored-by: HermanPlay <78978614+HermanPlay@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 765565c7..2adcfb9f 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -34,16 +34,6 @@ jobs: go-version-file: go.mod cache: true - - name: Cache Go modules - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Install Go dependencies run: go mod tidy