-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add callable workflow for only building the server image
- Loading branch information
1 parent
012bfdd
commit 2652c1d
Showing
3 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# This workflow builds the server docker image and exposes it as an artifact which may be used by | ||
# other GitHub workflow jobs. This is useful for creating docker images that you want to use to | ||
# test a certain commit of server without publishing them. | ||
|
||
name: Build Docker Image as Artifact | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
# TODO: Shouldn't be required. If not set, use existing submodule. | ||
temporal-server-repo-ref: | ||
type: string | ||
required: true | ||
temporal-server-repo-path: | ||
type: string | ||
default: "temporalio/temporal" | ||
docker-builds-repo-ref: | ||
type: string | ||
default: "main" | ||
|
||
jobs: | ||
build-image: | ||
# TODO: use bigger runner when available. Seems like they're stuck or not enough? | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout docker builds repository | ||
uses: actions/checkout@v3 | ||
with: | ||
# Must specify repo path, or it will use path of calling workflow | ||
repository: temporalio/docker-builds | ||
ref: ${{ inputs.docker-builds-repo-ref }} | ||
submodules: "true" | ||
|
||
- name: Checkout temporal server repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ inputs.temporal-server-repo-path }} | ||
path: temporal-server-checkedout | ||
ref: ${{ inputs.temporal-server-repo-ref }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build Server Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
file: server.Dockerfile | ||
build-args: TEMPORAL_REPO_PATH=temporal-server-checkedout | ||
tags: temporal-server:latest | ||
load: true | ||
|
||
- name: Build Admin tools Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
file: admin-tools.Dockerfile | ||
build-args: | | ||
TEMPORAL_REPO_PATH=temporal-server-checkedout | ||
SERVER_IMAGE=temporal-server:latest | ||
tags: temporal-admin-tools:latest | ||
load: true | ||
|
||
- name: Build Autosetup Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
file: admin-tools.Dockerfile | ||
build-args: | | ||
SERVER_IMAGE=temporal-server:latest | ||
ADMIN_TOOLS_IMAGE=temporal-admin-tools:latest | ||
tags: temporal-autosetup:latest | ||
outputs: type=docker,dest=/tmp/temporal-autosetup.tar | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: temporal-server-docker | ||
path: | | ||
/tmp/temporal-autosetup.tar | ||
./temporal-server-checkout/develop/docker-compose/docker-compose.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters