Skip to content

Commit 58bc350

Browse files
Add JFrog OIDC module resolution to release workflow (#1631)
## Changes The push workflow already resolves Go modules through JFrog via the `setup-build-environment` composite action, but the release workflow was still hitting the network directly. This adds the same JFrog setup to `release.yml`: - JFrog CLI setup with OIDC authentication - `jf go mod download` to pull modules through JFrog - `GOPROXY=file://...` so GoReleaser's native `go build` resolves from the local cache Also adds explicit `permissions` (`id-token: write` for OIDC, `contents: write` for creating releases). ## Tests - [ ] Trigger a snapshot build (merge queue) and verify GoReleaser succeeds - [ ] Verify a tag push still creates the GitHub release correctly NO_CHANGELOG=true This pull request was AI-assisted by Isaac. Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>
1 parent 8d0c6e0 commit 58bc350

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,23 @@ jobs:
1313
group: databricks-deco-testing-runner-group
1414
labels: ubuntu-latest-deco
1515

16+
permissions:
17+
id-token: write
18+
contents: write
19+
1620
steps:
1721
- name: Checkout
1822
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1923
with:
2024
fetch-depth: 0
2125

26+
- name: Setup JFrog CLI with OIDC
27+
uses: jfrog/setup-jfrog-cli@279b1f629f43dd5bc658d8361ac4802a7ef8d2d5 # v4.9.1
28+
env:
29+
JF_URL: https://databricks.jfrog.io
30+
with:
31+
oidc-provider-name: github-actions
32+
2233
- name: Setup Go
2334
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
2435
with:
@@ -31,6 +42,17 @@ jobs:
3142
go.sum
3243
.goreleaser.yml
3344
45+
- name: Download Go modules via JFrog
46+
run: |
47+
jf goc --repo-resolve=db-golang
48+
jf go mod download
49+
50+
# Point native go commands at the local module cache instead of
51+
# the network. go run pkg@version needs module lookups even when
52+
# cached; file:// satisfies these from disk without network access.
53+
echo "GOPROXY=file://$(go env GOMODCACHE)/cache/download" >> $GITHUB_ENV
54+
echo "GONOSUMCHECK=*" >> $GITHUB_ENV
55+
echo "GONOSUMDB=*" >> $GITHUB_ENV
3456
3557
- name: Write release notes to file
3658
run: |

0 commit comments

Comments
 (0)