Skip to content

Commit 0e4232f

Browse files
korniltsevshelldandy
authored andcommitted
chore: migrate main builds from gcr to dockerhub (grafana#3876)
1 parent bd87e13 commit 0e4232f

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,18 @@ jobs:
130130
uses: actions/setup-go@v5
131131
with:
132132
go-version: 1.22.11
133-
- uses: actions/setup-node@v3
134-
with:
135-
node-version: lts/hydrogen
136-
cache: yarn
137-
- name: Login to GCR
133+
- name: Login to Docker Hub
138134
uses: docker/login-action@v2
139135
with:
140-
registry: us.gcr.io
141-
username: _json_key
142-
password: ${{ secrets.GCR_JSON_KEY }}
143-
- name: Pyroscope Build & push multi-arch image
136+
username: ${{ secrets.DOCKERHUB_USERNAME }}
137+
password: ${{ secrets.DOCKERHUB_TOKEN }}
138+
- name: Pyroscope Build & push multi-arch image # todo make it multi-arch
144139
id: build-push
145140
run: |
146141
make docker-image/pyroscope/push docker-image/pyroscope/push-debug "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha"
147142
148143
deploy-dev-001:
149-
if: github.event_name == 'push' && github.repository == 'grafana/pyroscope'
144+
if: github.event_name == 'push' && github.repository == 'grafana/pyroscope' && github.ref == 'refs/heads/main'
150145
runs-on: ubuntu-latest
151146
needs: [build-push]
152147
steps:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ GOPRIVATE=github.com/grafana/frostdb
1919

2020
# Boiler plate for building Docker containers.
2121
# All this must go at top of file I'm afraid.
22-
IMAGE_PREFIX ?= us.gcr.io/kubernetes-dev/
22+
IMAGE_PREFIX ?= grafana/
2323

2424
IMAGE_TAG ?= $(shell ./tools/image-tag)
2525
GIT_REVISION := $(shell git rev-parse --short HEAD)
@@ -197,7 +197,7 @@ check/go/mod: go/mod
197197

198198

199199
define docker_buildx
200-
docker buildx build $(1) --platform $(IMAGE_PLATFORM) $(BUILDX_ARGS) --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(2)latest -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(2)$(IMAGE_TAG) -f cmd/$(shell basename $(@D))/$(2)Dockerfile .
200+
docker buildx build $(1) --platform $(IMAGE_PLATFORM) $(BUILDX_ARGS) --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(2)$(IMAGE_TAG) -f cmd/$(shell basename $(@D))/$(2)Dockerfile .
201201
endef
202202

203203
define deploy

docs/internal/contributing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ replace `image: grafana/pyroscope` with the local tag name you got from docker-i
8181

8282
```
8383
pyroscope:
84-
image: us.gcr.io/kubernetes-dev/pyroscope:main-470125e1-WIP
84+
image: grafana/pyroscope:main-470125e1-WIP
8585
ports:
8686
- '4040:4040'
8787
```

0 commit comments

Comments
 (0)