Skip to content

Commit 331c412

Browse files
authored
ci: sync with netresearch/.github templates/go-app (#211)
Auto-opened by sync-template.sh. Brings this repo back into alignment with the canonical `go-app` template in `netresearch/.github`. To keep any diverging files, add their paths to `.github/template.yaml`'s `intentional-drift:` list before merging — otherwise the next sync run will revert them.
2 parents b5e5415 + 72b2eb4 commit 331c412

5 files changed

Lines changed: 52 additions & 13 deletions

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ updates:
3030
docker:
3131
patterns: ['*']
3232

33+
- package-ecosystem: npm
34+
directory: /
35+
schedule:
36+
interval: weekly
37+
day: monday
38+
open-pull-requests-limit: 5
39+
groups:
40+
npm:
41+
patterns: ['*']
42+
3343
- package-ecosystem: devcontainers
3444
directory: /
3545
schedule:

.github/labeler.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ ci:
66
- any-glob-to-any-file: ['.github/**/*', 'Makefile']
77
dependencies:
88
- changed-files:
9-
- any-glob-to-any-file: ['go.mod', 'go.sum', 'Dockerfile', '.devcontainer/**/*']
9+
- any-glob-to-any-file: ['go.mod', 'go.sum', 'Dockerfile', '.devcontainer/**/*', 'package.json', 'package-lock.json', 'bun.lock', 'bun.lockb', 'yarn.lock', 'tsconfig*.json']
1010
tests:
1111
- changed-files:
12-
- any-glob-to-any-file: ['**/*_test.go', 'testdata/**/*']
12+
- any-glob-to-any-file: ['**/*_test.go', 'testdata/**/*', '**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts']
13+
frontend:
14+
- changed-files:
15+
- any-glob-to-any-file: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.css', '**/*.scss', '**/*.html', '**/*.templ']

.github/workflows/codeql.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,38 @@ on:
1111
permissions: {}
1212

1313
jobs:
14+
detect:
15+
name: Detect languages
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 2
18+
permissions:
19+
contents: read
20+
outputs:
21+
languages: ${{ steps.detect.outputs.languages }}
22+
steps:
23+
- name: Harden Runner
24+
uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0
25+
with:
26+
egress-policy: audit
27+
- name: Checkout
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
persist-credentials: false
31+
- name: Detect TS/JS + Go
32+
id: detect
33+
run: |
34+
set -euo pipefail
35+
langs="go"
36+
if [ -f package.json ] || [ -n "$(find . -maxdepth 3 -name '*.ts' -o -name '*.tsx' -o -name '*.mts' 2>/dev/null | head -1)" ]; then
37+
langs="${langs},javascript-typescript"
38+
fi
39+
echo "languages=${langs}" >> "$GITHUB_OUTPUT"
40+
1441
codeql:
42+
needs: detect
1543
uses: netresearch/.github/.github/workflows/codeql.yml@main
1644
with:
17-
languages: go
45+
languages: ${{ needs.detect.outputs.languages }}
1846
permissions:
1947
contents: read
2048
security-events: write

.github/workflows/release.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@ on:
1313
permissions: {}
1414

1515
jobs:
16+
# Creates the GitHub release shell. Consumers that ship binaries or images
17+
# add their own caller of netresearch/.github/.github/workflows/build-go-attest.yml
18+
# (matrix over goos/goarch) and/or build-container.yml in a separate PR —
19+
# those need per-repo knowledge (binary name, platforms, pre-build-command
20+
# for Bun/templ/etc.) that doesn't belong in a one-size-fits-all template.
1621
create:
1722
uses: netresearch/.github/.github/workflows/create-release.yml@main
1823
with:
1924
tag: ${{ inputs.tag || github.ref_name }}
2025
permissions:
2126
contents: write
22-
23-
binaries:
24-
needs: create
25-
uses: netresearch/.github/.github/workflows/build-go-attest.yml@main
26-
with:
27-
tag: ${{ inputs.tag || github.ref_name }}
28-
permissions:
29-
contents: write
30-
id-token: write
31-
attestations: write

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Raybeam
22

3+
[![Template Drift](https://github.com/netresearch/raybeam/actions/workflows/check-template-drift.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/check-template-drift.yml)
4+
[![managed by netresearch/.github templates](https://img.shields.io/badge/template-netresearch%2F.github-2F99A4?logo=github)](https://github.com/netresearch/.github/tree/main/templates/go-app)
5+
36
[![Go Reference](https://pkg.go.dev/badge/github.com/netresearch/raybeam.svg)](https://pkg.go.dev/github.com/netresearch/raybeam)
47
[![Go Report Card](https://goreportcard.com/badge/github.com/netresearch/raybeam)](https://goreportcard.com/report/github.com/netresearch/raybeam)
58
[![CI Status](https://github.com/netresearch/raybeam/actions/workflows/ci.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/ci.yml)

0 commit comments

Comments
 (0)