diff --git a/__tests__/git.test.ts b/__tests__/git.test.ts index 5b64456a..5a33bdd5 100644 --- a/__tests__/git.test.ts +++ b/__tests__/git.test.ts @@ -470,6 +470,5 @@ describe('git', () => { expect(execute).toBeCalledTimes(13) // normally 11 runs, +2 of the tag expect(response).toBe(Status.SUCCESS) }) - }) }) diff --git a/action.yml b/action.yml index f508021d..4474464d 100644 --- a/action.yml +++ b/action.yml @@ -82,6 +82,10 @@ inputs: description: "This should point to where your project lives on the virtual machine. The GitHub Actions environment will set this for you. It is only neccersary to set this variable if you're using the node module." required: false + tag: + description: "Add a tag to the commit. Only works when 'dry-run' is not used." + required: false + single-commit: description: "This option can be used if you'd prefer to have a single commit on the deployment branch instead of maintaining the full history." required: false diff --git a/src/git.ts b/src/git.ts index 3d23ff3c..3e65c773 100644 --- a/src/git.ts +++ b/src/git.ts @@ -1,4 +1,4 @@ -import { info, warning } from '@actions/core' +import {info} from '@actions/core' import {mkdirP, rmRF} from '@actions/io' import fs from 'fs' import { @@ -317,7 +317,7 @@ export async function deploy(action: ActionInterface): Promise { info(`Changes committed to the ${action.branch} branch… 📦`) if (action.tag) { - info(`Adding a tag '${action.tag}' to the commit`) + info(`Adding tag '${action.tag}' to the commit`) await execute( `git tag ${action.tag}`, `${action.workspace}/${temporaryDeploymentDirectory}`, @@ -330,7 +330,9 @@ export async function deploy(action: ActionInterface): Promise { action.silent ) - info(`Tag '${action.tag}' created and pushed to the ${action.branch} branch… 📦`) + info( + `Tag '${action.tag}' created and pushed to the ${action.branch} branch… 🏷️` + ) } return Status.SUCCESS