Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
steps:

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup-go@v6 before checkout breaks default caching

High Severity

In the test job, actions/setup-go@v6 runs before actions/checkout@v6. Unlike @v1, setup-go@v6 enables dependency caching by default and needs go.mod for cache key generation. Since the repo hasn't been checked out yet, go.mod doesn't exist, and the step will fail with a "Dependencies file is not found" error. The release job has the correct order (checkout first), but the test job does not.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unquoted go-version: 1.20 installs Go 1.2

High Severity

The unquoted go-version: 1.20 is parsed by YAML as the float 1.2, causing Go 1.2 (from 2013) to be installed instead of Go 1.20. The project's go.mod confirms the intended version is go 1.20. The value needs to be quoted (e.g., '1.20') to be treated as a string. This is a well-documented YAML gotcha that directly impacts both the test and release jobs after the setup-go version upgrade.

Additional Locations (1)
Fix in Cursor Fix in Web

with:
go-version: 1.20
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Run test
run: make test
Expand All @@ -38,27 +38,27 @@ jobs:
steps:

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v4
with:
registry: ghcr.io
username: scribdbot
password: ${{ secrets.SCRIBDBOT_GH_CONTAINER_REGISTRY_TOKEN }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v6

# required for the changelog to work correctly
- name: Unshallow
run: git fetch --prune --unshallow

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v6
with:
go-version: 1.20
id: go

- name: Run goreleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v7
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed --rm-dist flag breaks goreleaser v2 release

High Severity

Upgrading goreleaser-action from @v5 to @v7 changes the default GoReleaser version from ~> v1 to ~> v2. GoReleaser v2 removed the --rm-dist flag entirely (replaced by --clean). The args: release --rm-dist on line 64 will cause the release job to fail with an unknown flag error. The flag needs to be updated to --clean.

Fix in Cursor Fix in Web

with:
version: latest
args: release --rm-dist
Expand Down
Loading