-
Notifications
You must be signed in to change notification settings - Fork 63
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 #68 from Scale3-Labs/dylan/format-release
Dylan/format release
- Loading branch information
Showing
3 changed files
with
66 additions
and
14 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,55 @@ | ||
name: "Build Docker Image" | ||
run-name: "Version: ${{ inputs.imageTag }} --> Latest: ${{ inputs.isLatest }}" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
imageTag: | ||
description: Release version | ||
required: true | ||
default: example | ||
isLatest: | ||
description: Is this the latest version? | ||
type: boolean | ||
required: true | ||
default: false | ||
|
||
jobs: | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_REGISTRY: scale3labs/langtrace-client | ||
steps: | ||
- name: Github Checkout | ||
# v4.1.1 | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
|
||
- name: Log in to Docker Hub | ||
# v3.1.0 | ||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image with latest tag | ||
# v5.3.0 | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.DOCKER_REGISTRY }}:${{ inputs.imageTag }} | ||
${{ env.DOCKER_REGISTRY }}:latest | ||
labels: ${{ inputs.imageTag }} | ||
if: ${{ inputs.isLatest }} | ||
|
||
- name: Build and push Docker image without latest tag | ||
# v5.3.0 | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ env.DOCKER_REGISTRY }}:${{ inputs.imageTag }} | ||
if: ${{ !inputs.isLatest }} |
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