-
Notifications
You must be signed in to change notification settings - Fork 16
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 #576 from openziti/release-docker-workflow
docker release workflow
- Loading branch information
Showing
7 changed files
with
125 additions
and
15 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
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,85 @@ | ||
name: CI build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ziti-version: | ||
description: 'Ziti Tunneler Release Version' | ||
type: string | ||
required: true | ||
workflow_dispatch: | ||
inputs: | ||
ziti-version: | ||
description: 'Ziti Tunneler Release Version' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
publish-containers: | ||
runs-on: ubuntu-latest | ||
env: | ||
ZITI_VERSION: ${{ inputs.ziti-version || github.event.inputs.ziti-version }} | ||
steps: | ||
- name: Checkout Workspace | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: amd64,arm64,arm | ||
|
||
- name: Set up Docker BuildKit | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_API_USER }} | ||
password: ${{ secrets.DOCKER_HUB_API_TOKEN }} | ||
|
||
- name: Set up Docker image tags for "run" container | ||
env: | ||
RELEASE_REPO: openziti/ziti-edge-tunnel | ||
id: tagprep_run | ||
run: | | ||
DOCKER_TAGS="" | ||
DOCKER_TAGS="${RELEASE_REPO}:${ZITI_VERSION},${RELEASE_REPO}:latest" | ||
echo "DEBUG: DOCKER_TAGS=${DOCKER_TAGS}" | ||
echo DOCKER_TAGS="${DOCKER_TAGS}" >> $GITHUB_OUTPUT | ||
- name: Build & Push Multi-Platform Container Image to Hub | ||
uses: docker/build-push-action@v3 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: ${{ github.workspace }}/docker | ||
file: ${{ github.workspace }}/docker/Dockerfile | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
tags: ${{ steps.tagprep_run.outputs.DOCKER_TAGS }} | ||
build-args: | | ||
ZITI_VERSION=${{ env.ZITI_VERSION }} | ||
GITHUB_REPO=${{ github.repository }} | ||
push: true | ||
|
||
- name: Set up Docker image tags for "run-host" container | ||
env: | ||
RELEASE_REPO: openziti/ziti-host | ||
id: tagprep_run_host | ||
run: | | ||
DOCKER_TAGS="" | ||
DOCKER_TAGS="${RELEASE_REPO}:${ZITI_VERSION},${RELEASE_REPO}:latest" | ||
echo "DEBUG: DOCKER_TAGS=${DOCKER_TAGS}" | ||
echo DOCKER_TAGS="${DOCKER_TAGS}" >> $GITHUB_OUTPUT | ||
- name: Build & Push Multi-Platform Container Image to Hub | ||
uses: docker/build-push-action@v3 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: ${{ github.workspace }}/docker | ||
file: ${{ github.workspace }}/docker/Dockerfile.ziti-host | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.tagprep_run_host.outputs.DOCKER_TAGS }} | ||
build-args: | | ||
ZITI_VERSION=${{ env.ZITI_VERSION }} | ||
GITHUB_REPO=${{ github.repository }} | ||
push: true |
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
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