diff --git a/.github/docker/docker-bake.hcl b/.github/docker/docker-bake.hcl index f890ae32e..0f158496c 100644 --- a/.github/docker/docker-bake.hcl +++ b/.github/docker/docker-bake.hcl @@ -10,6 +10,10 @@ variable "IMAGE_NAME" { default = "temporal" } +variable "GITHUB_REPOSITORY" { + default = "temporalio/cli" +} + variable "IMAGE_SHA_TAG" {} variable "IMAGE_BRANCH_TAG" {} @@ -46,8 +50,8 @@ target "cli" { labels = { "org.opencontainers.image.title" = "temporal" "org.opencontainers.image.description" = "Temporal CLI" - "org.opencontainers.image.url" = "https://github.com/temporalio/cli" - "org.opencontainers.image.source" = "https://github.com/temporalio/cli" + "org.opencontainers.image.url" = "https://github.com/${GITHUB_REPOSITORY}" + "org.opencontainers.image.source" = "https://github.com/${GITHUB_REPOSITORY}" "org.opencontainers.image.licenses" = "MIT" "org.opencontainers.image.revision" = "${CLI_SHA}" "org.opencontainers.image.created" = timestamp() diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 0ff8b0e68..9cc7b646a 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -194,6 +194,7 @@ jobs: IMAGE_REPO: ${{ steps.meta.outputs.image_repo }} IMAGE_NAMESPACE: ${{ steps.meta.outputs.image_namespace }} IMAGE_NAME: ${{ steps.meta.outputs.image_name }} + GITHUB_REPOSITORY: ${{ github.repository }} - name: Build Docker image if: ${{ !inputs.publish }} @@ -210,3 +211,4 @@ jobs: IMAGE_REPO: ${{ steps.meta.outputs.image_repo }} IMAGE_NAMESPACE: ${{ steps.meta.outputs.image_namespace }} IMAGE_NAME: ${{ steps.meta.outputs.image_name }} + GITHUB_REPOSITORY: ${{ github.repository }}