-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow that is only triggered when a GH Release is created. Signed-off-by: Leonardo Graboski Veiga <[email protected]>
- Loading branch information
Showing
7 changed files
with
190 additions
and
80 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,48 @@ | ||
name: Docker Build and Push | ||
description: Reusable Docker build and push logic | ||
|
||
inputs: | ||
username: | ||
description: 'Docker Hub registry username' | ||
required: true | ||
password: | ||
description: 'Docker Hub password' | ||
required: true | ||
context: | ||
description: 'The Docker build context' | ||
required: true | ||
imgarch: | ||
description: 'Architecture of the container image' | ||
required: true | ||
tagname: | ||
description: 'Docker tag name before the :' | ||
required: true | ||
tagversion: | ||
description: 'Docker tag version after the :' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ inputs.username }} | ||
password: ${{ inputs.password }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
context: ${{ inputs.context }} | ||
platforms: linux/${{ inputs.imgarch }} | ||
build-args: | | ||
IMAGE_ARCH=${{ inputs.imgarch }} | ||
tags: | | ||
${{ inputs.username }}/${{ inputs.tagname }}:${{ inputs.tagversion }} |
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
Oops, something went wrong.