Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions .github/actions/setup-and-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Setup Go and Build
description: Checkout repo, set up Go version from go.mod, and compile the project

runs:
using: composite
steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true

Comment on lines +9 to +13

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

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

This composite action enables cache: true for actions/setup-go. Some workflows in this PR set job-level permissions: (e.g., contents: read/write), which can implicitly drop the actions scope; that can prevent the cache from being saved/restored and cause the job to fail with permission errors. Consider either (a) making caching configurable via an input (default off), or (b) updating the affected workflows’ permissions to include the minimum required actions: read/actions: write for caching.

Copilot uses AI. Check for mistakes.
- name: Build
shell: bash
run: go build ./...
18 changes: 1 addition & 17 deletions .github/workflows/dependabot-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,4 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout PR branch
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'

- name: Build Go project
run: |
echo "Building Go project..."
go build ./...
if [ $? -ne 0 ]; then
echo "Go build failed!"
exit 1
fi
echo "Go build successful!"
- uses: ./.github/actions/setup-and-build
10 changes: 1 addition & 9 deletions .github/workflows/go-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: true

- name: Build
run: go build ./...
- uses: ./.github/actions/setup-and-build

Comment on lines 14 to 16

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

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

In GitHub Actions YAML, list items under steps: must be indented more than the steps: key. Here - uses: ./.github/actions/setup-and-build is aligned with steps:, which makes the workflow invalid YAML (the step won’t be part of steps). Indent the - uses line (and the rest of the steps list, if needed) under steps:.

Copilot uses AI. Check for mistakes.
- name: Restore build cache
uses: actions/cache@v5
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/newsletter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version: '1.25'

- name: Build
run: go build ./...
- uses: ./.github/actions/setup-and-build

Comment on lines 14 to 16

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

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

The - uses: ./.github/actions/setup-and-build line needs to be indented under steps: (list items must be more indented than their parent key). As written, it’s aligned with steps:, which makes the workflow YAML invalid / the step not included in the job’s steps.

Copilot uses AI. Check for mistakes.
- name: Post to Buttondown
env:
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/sync-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version: '1.25'

- name: Build
run: go build ./...
- uses: ./.github/actions/setup-and-build

Comment on lines 17 to 19

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

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

The steps list item (- uses: ./.github/actions/setup-and-build) is not indented under steps:. GitHub Actions requires the list items to be more indented than the steps: key; otherwise the workflow YAML is invalid / the job will have no steps.

Copilot uses AI. Check for mistakes.
- name: Create credentials.json
run: |
Expand Down