-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from kafkesc/detro/publish-to-docker-directly…
…-from-here Publish to Docker directly from this repository
- Loading branch information
Showing
8 changed files
with
334 additions
and
200 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 |
---|---|---|
@@ -1,5 +1,2 @@ | ||
[target.x86_64-pc-windows-msvc] | ||
rustflags = ["-C", "target-feature=+crt-static"] | ||
|
||
[registries.crates-io] | ||
protocol = "sparse" |
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
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,66 @@ | ||
name: Publish Docker Image | ||
|
||
on: | ||
# This workflow is designed to be invoked by others, not triggered by events. | ||
workflow_call: | ||
inputs: | ||
|
||
target-platforms: | ||
type: string | ||
default: linux/amd64,linux/arm64 | ||
description: Platforms to target when publishing the docker image | ||
|
||
dockerhub-org: | ||
type: string | ||
default: kafkesc | ||
description: Docker Hub organization under which to publish the docker image | ||
|
||
dockerhub-imagename: | ||
type: string | ||
default: ksunami | ||
description: Name of the docker image to publish | ||
|
||
release-version: | ||
required: true | ||
type: string | ||
description: Version to publish as docker image (eg. 'vX.Y.Z') | ||
|
||
secrets: | ||
|
||
dockerhub-username: | ||
required: true | ||
description: Docker Hub username to use when publishing the image | ||
|
||
dockerhub-password: | ||
required: true | ||
description: Docker Hub password to use when publishing the image (e.g. the API token) | ||
|
||
jobs: | ||
publish: | ||
name: Build & Publish ${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:${{ inputs.release-version }} for ${{ inputs.target-platforms }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.dockerhub-username }} | ||
password: ${{ secrets.dockerhub-password }} | ||
|
||
- name: Set-up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
platforms: ${{ inputs.target-platforms }} | ||
|
||
- name: Build & Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
platforms: ${{ inputs.target-platforms }} | ||
build-args: | | ||
KSUNAMI_VERSION=${{ inputs.release-version }} | ||
tags: | | ||
${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:latest | ||
${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:${{ inputs.release-version }} |
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
Oops, something went wrong.