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
8 changes: 4 additions & 4 deletions .github/docker/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "IMAGE_REPO" {
default = "temporalio"
default = "ghcr.io/chaptersix"
}

variable "IMAGE_SHA_TAG" {}
Expand Down Expand Up @@ -27,9 +27,9 @@ target "cli" {
dockerfile = ".github/docker/cli.Dockerfile"
context = "."
tags = compact([
"${IMAGE_REPO}/temporal:${IMAGE_SHA_TAG}",
"${IMAGE_REPO}/temporal:${VERSION}",
TAG_LATEST ? "${IMAGE_REPO}/temporal:latest" : "",
"${IMAGE_REPO}/temporal-cli:${IMAGE_SHA_TAG}",
"${IMAGE_REPO}/temporal-cli:${VERSION}",
TAG_LATEST ? "${IMAGE_REPO}/temporal-cli:latest" : "",
])
platforms = ["linux/amd64", "linux/arm64"]
args = {
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ on:
description: "Version tag for the release (required if publish is true)"
required: false
type: string
secrets:
DOCKER_USERNAME:
required: false
DOCKER_PASSWORD:
required: false
secrets: {}

jobs:
build:
Expand Down Expand Up @@ -84,12 +80,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: inputs.publish && github.repository_owner == 'temporalio'
- name: Log in to GitHub Container Registry
if: inputs.publish
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get build metadata
id: meta
Expand Down Expand Up @@ -134,7 +131,7 @@ jobs:
console.log(`Release prerelease: ${release.prerelease}, tag_latest: ${!release.prerelease}`)

- name: Build and push Docker image
if: inputs.publish && github.repository_owner == 'temporalio'
if: inputs.publish
run: |
docker buildx bake \
--file .github/docker/docker-bake.hcl \
Expand All @@ -146,7 +143,7 @@ jobs:
IMAGE_BRANCH_TAG: ${{ steps.meta.outputs.image_branch_tag }}
VERSION: ${{ steps.meta.outputs.version }}
TAG_LATEST: ${{ steps.check_latest.outputs.tag_latest }}
IMAGE_REPO: temporalio
IMAGE_REPO: ${{ steps.meta.outputs.image_repo }}

- name: Build Docker image
if: ${{ !inputs.publish }}
Expand All @@ -160,7 +157,7 @@ jobs:
IMAGE_BRANCH_TAG: ${{ steps.meta.outputs.image_branch_tag }}
VERSION: ${{ steps.meta.outputs.version }}
TAG_LATEST: false
IMAGE_REPO: temporalio
IMAGE_REPO: ${{ steps.meta.outputs.image_repo }}

- name: Upload build artifacts
if: ${{ !inputs.publish }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ jobs:
with:
publish: true
version: ${{ github.ref_name }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Loading