Skip to content

Commit

Permalink
add optional custom docker tag
Browse files Browse the repository at this point in the history
  • Loading branch information
feliciachang committed Jun 27, 2024
1 parent 019b3fa commit e7e0184
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The following options must be configured in order to make a deployment. As shown
| jamsocket_service | The name of the Jamsocket service you are pushing your code to. | `with` | Yes |
| docker_build_context | The path to the directory that your [Docker build should access](https://docs.docker.com/build/building/context/). This is often the directory the Dockerfile is in. | `with` | Yes |
| dockerfile_path | The path to your Dockerfile. | `with` | Yes |
| docker_tag | A custom tag for your Docker image. | `with` | No |

## Deployment

Expand Down
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
dockerfile_path:
description: 'Path to your Dockerfile'
required: true
docker_tag:
description: 'Custom tag for your Docker image'
required: false
default: 'latest'
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -50,7 +54,7 @@ runs:
with:
images: new.jamcr.io/${{ inputs.jamsocket_account }}/${{ inputs.jamsocket_service }}
tags: |
type=raw,value=latest
type=raw,value=${{ inputs.docker_tag }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
Expand All @@ -59,7 +63,6 @@ runs:
file: ${{ inputs.dockerfile_path }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

branding:
icon: 'check-circle'
Expand Down

0 comments on commit e7e0184

Please sign in to comment.