diff --git a/README.md b/README.md index aa25e7e..4c42b42 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: Deploy to Jamsocket - uses: jamsocket/jamsocket-deploy-action@v0.1.1 + uses: jamsocket/jamsocket-deploy-action@v0.1.3 with: jamsocket_api_token: ${{ secrets.JAMSOCKET_API_TOKEN }} jamsocket_account: my-jamsocket-account @@ -43,7 +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 | +| tag | A custom tag to apply to the image. If provided, this image will only be used when this tag is provided in the spawn request. This can be used for preview deploy-like functionality. | `with` | No | ## Deployment diff --git a/action.yml b/action.yml index 346ab8c..449a561 100644 --- a/action.yml +++ b/action.yml @@ -16,7 +16,7 @@ inputs: dockerfile_path: description: 'Path to your Dockerfile' required: true - docker_tag: + tag: description: 'Custom tag for your Docker image' required: false default: 'latest' @@ -54,7 +54,12 @@ runs: with: images: new.jamcr.io/${{ inputs.jamsocket_account }}/${{ inputs.jamsocket_service }} tags: | - type=raw,value=${{ inputs.docker_tag }} + type=raw,value=${{ inputs.tag }} + labels: | + hash=${{ github.sha }} + message=${{ github.event.head_commit.message }} + branch=${{ github.ref_name }} + repository=${{ github.repository }} - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -63,6 +68,7 @@ runs: file: ${{ inputs.dockerfile_path }} push: true tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} branding: icon: 'check-circle'