Skip to content

Commit f819246

Browse files
authored
Switch to dockerhub temporalio org for images. (#110)
This pushes an image for every push to main, and builds tagged images on release.
1 parent df5d4e8 commit f819246

File tree

4 files changed

+45
-52
lines changed

4 files changed

+45
-52
lines changed

.github/workflows/publish-latest-image.yml renamed to .github/workflows/publish-main-image.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: publish-latest-image
1+
name: publish-main-image
22

33
on:
44
workflow_dispatch:
@@ -11,7 +11,7 @@ permissions:
1111
packages: write
1212

1313
jobs:
14-
publish-latest-image:
14+
publish-main-image:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
@@ -28,25 +28,25 @@ jobs:
2828
- name: Set up Docker Buildx
2929
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
3030

31-
- name: Login to GitHub Container Registry
31+
- name: Login to Docker Hub
3232
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
3333
with:
34-
registry: ghcr.io
35-
username: ${{ github.actor }}
36-
password: ${{ secrets.GITHUB_TOKEN }}
34+
registry: docker.io
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PAT}}
3737

3838
- name: Run GoReleaser
3939
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
4040
with:
4141
version: v2.11.2
42-
args: release --config .goreleaser.latest.yml --snapshot --clean
42+
args: release --config .goreleaser.main.yml --snapshot --clean
4343

4444
- name: Push snapshot images
4545
run: |
46-
docker push "ghcr.io/${GITHUB_REPOSITORY}:latest-amd64"
47-
docker push "ghcr.io/${GITHUB_REPOSITORY}:latest-arm64"
46+
docker push "temporalio/temporal-worker-controller:main-amd64"
47+
docker push "temporalio/temporal-worker-controller:main-arm64"
4848
49-
- name: Create and push manifest for :latest tag
49+
- name: Create and push manifest for :main tag
5050
run: |
51-
docker manifest create "ghcr.io/${GITHUB_REPOSITORY}:latest" "ghcr.io/${GITHUB_REPOSITORY}:latest-amd64" "ghcr.io/${GITHUB_REPOSITORY}:latest-arm64"
52-
docker manifest push "ghcr.io/${GITHUB_REPOSITORY}:latest"
51+
docker manifest create "temporalio/temporal-worker-controller:main" "temporalio/temporal-worker-controller:main-amd64" "temporalio/temporal-worker-controller:main-arm64"
52+
docker manifest push "temporalio/temporal-worker-controller:main"

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77

88
permissions:
99
contents: write
10-
packages: write
1110

1211
jobs:
1312
release:
@@ -27,12 +26,12 @@ jobs:
2726
- name: Set up Docker Buildx
2827
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
2928

30-
- name: Login to GitHub Container Registry
29+
- name: Login to Docker Hub
3130
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
3231
with:
33-
registry: ghcr.io
34-
username: ${{ github.actor }}
35-
password: ${{ secrets.GITHUB_TOKEN }}
32+
registry: docker.io
33+
username: ${{ secrets.DOCKER_USERNAME }}
34+
password: ${{ secrets.DOCKER_PAT}}
3635

3736
- name: Run GoReleaser
3837
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
version: 2
22

3-
env:
4-
- GITHUB_REPOSITORY={{ if index .Env "GITHUB_REPOSITORY" }}{{ .Env.GITHUB_REPOSITORY }}{{ else }}temporalio/temporal-worker-controller{{ end }}
5-
63
before:
74
hooks:
85
- go mod download
@@ -33,44 +30,44 @@ builds:
3330
checksum:
3431
disable: true
3532

36-
# Only build Docker images with 'latest' tag
33+
# Only build Docker images with 'main' tag
3734
dockers:
3835
- image_templates:
39-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest-amd64"
36+
- "temporalio/temporal-worker-controller:main-amd64"
4037
dockerfile: Dockerfile.goreleaser
4138
use: buildx
4239
build_flag_templates:
4340
- --platform=linux/amd64
4441
- --label=org.opencontainers.image.title={{ .ProjectName }}
4542
- --label=org.opencontainers.image.description=Temporal Worker Controller for Kubernetes
46-
- --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
47-
- --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
48-
- --label=org.opencontainers.image.version=latest
43+
- --label=org.opencontainers.image.url=https://github.com/temporalio/temporal-worker-controller
44+
- --label=org.opencontainers.image.source=https://github.com/temporalio/temporal-worker-controller
45+
- --label=org.opencontainers.image.version=main
4946
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
5047
- --label=org.opencontainers.image.revision={{ .FullCommit }}
5148
- --label=org.opencontainers.image.licenses=MIT
5249
extra_files:
5350
- LICENSE
5451

5552
- image_templates:
56-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest-arm64"
53+
- "temporalio/temporal-worker-controller:main-arm64"
5754
dockerfile: Dockerfile.goreleaser
5855
use: buildx
5956
build_flag_templates:
6057
- --platform=linux/arm64
6158
- --label=org.opencontainers.image.title={{ .ProjectName }}
6259
- --label=org.opencontainers.image.description=Temporal Worker Controller for Kubernetes
63-
- --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
64-
- --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
65-
- --label=org.opencontainers.image.version=latest
60+
- --label=org.opencontainers.image.url=https://github.com/temporalio/temporal-worker-controller
61+
- --label=org.opencontainers.image.source=https://github.com/temporalio/temporal-worker-controller
62+
- --label=org.opencontainers.image.version=main
6663
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
6764
- --label=org.opencontainers.image.revision={{ .FullCommit }}
6865
- --label=org.opencontainers.image.licenses=MIT
6966
extra_files:
7067
- LICENSE
7168

7269
docker_manifests:
73-
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest"
70+
- name_template: "temporalio/temporal-worker-controller:main"
7471
image_templates:
75-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest-amd64"
76-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest-arm64"
72+
- "temporalio/temporal-worker-controller:main-amd64"
73+
- "temporalio/temporal-worker-controller:main-arm64"

.goreleaser.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
version: 2
22

3-
env:
4-
- GITHUB_REPOSITORY={{ if index .Env "GITHUB_REPOSITORY" }}{{ .Env.GITHUB_REPOSITORY }}{{ else }}temporalio/temporal-worker-controller{{ end }}
5-
63
before:
74
hooks:
85
- go mod download
@@ -44,16 +41,16 @@ checksum:
4441

4542
dockers:
4643
- image_templates:
47-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-amd64"
48-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Major }}.{{ .Minor }}-amd64"
44+
- "temporalio/temporal-worker-controller:{{ .Tag }}-amd64"
45+
- "temporalio/temporal-worker-controller:v{{ .Major }}.{{ .Minor }}-amd64"
4946
dockerfile: Dockerfile.goreleaser
5047
use: buildx
5148
build_flag_templates:
5249
- --platform=linux/amd64
5350
- --label=org.opencontainers.image.title={{ .ProjectName }}
5451
- --label=org.opencontainers.image.description=Temporal Worker Controller for Kubernetes
55-
- --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
56-
- --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
52+
- --label=org.opencontainers.image.url=https://github.com/temporalio/temporal-worker-controller
53+
- --label=org.opencontainers.image.source=https://github.com/temporalio/temporal-worker-controller
5754
- --label=org.opencontainers.image.version={{ .Version }}
5855
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
5956
- --label=org.opencontainers.image.revision={{ .FullCommit }}
@@ -62,16 +59,16 @@ dockers:
6259
- LICENSE
6360

6461
- image_templates:
65-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-arm64"
66-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Major }}.{{ .Minor }}-arm64"
62+
- "temporalio/temporal-worker-controller:{{ .Tag }}-arm64"
63+
- "temporalio/temporal-worker-controller:v{{ .Major }}.{{ .Minor }}-arm64"
6764
dockerfile: Dockerfile.goreleaser
6865
use: buildx
6966
build_flag_templates:
7067
- --platform=linux/arm64
7168
- --label=org.opencontainers.image.title={{ .ProjectName }}
7269
- --label=org.opencontainers.image.description=Temporal Worker Controller for Kubernetes
73-
- --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
74-
- --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
70+
- --label=org.opencontainers.image.url=https://github.com/temporalio/temporal-worker-controller
71+
- --label=org.opencontainers.image.source=https://github.com/temporalio/temporal-worker-controller
7572
- --label=org.opencontainers.image.version={{ .Version }}
7673
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
7774
- --label=org.opencontainers.image.revision={{ .FullCommit }}
@@ -80,17 +77,17 @@ dockers:
8077
- LICENSE
8178

8279
docker_manifests:
83-
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}"
80+
- name_template: "temporalio/temporal-worker-controller:{{ .Tag }}"
8481
image_templates:
85-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-amd64"
86-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-arm64"
82+
- "temporalio/temporal-worker-controller:{{ .Tag }}-amd64"
83+
- "temporalio/temporal-worker-controller:{{ .Tag }}-arm64"
8784

88-
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Major }}.{{ .Minor }}"
85+
- name_template: "temporalio/temporal-worker-controller:v{{ .Major }}.{{ .Minor }}"
8986
image_templates:
90-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Major }}.{{ .Minor }}-amd64"
91-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Major }}.{{ .Minor }}-arm64"
87+
- "temporalio/temporal-worker-controller:v{{ .Major }}.{{ .Minor }}-amd64"
88+
- "temporalio/temporal-worker-controller:v{{ .Major }}.{{ .Minor }}-arm64"
9289

93-
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest"
90+
- name_template: "temporalio/temporal-worker-controller:latest"
9491
image_templates:
95-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-amd64"
96-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-arm64"
92+
- "temporalio/temporal-worker-controller:{{ .Tag }}-amd64"
93+
- "temporalio/temporal-worker-controller:{{ .Tag }}-arm64"

0 commit comments

Comments
 (0)