Skip to content

Commit

Permalink
chore: Formatting & Adding action yaml data
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Jul 17, 2022
1 parent 079ec0e commit 2991688
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion __tests__/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,5 @@ describe('git', () => {
expect(execute).toBeCalledTimes(13) // normally 11 runs, +2 of the tag
expect(response).toBe(Status.SUCCESS)
})

})
})
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/git.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -317,7 +317,7 @@ export async function deploy(action: ActionInterface): Promise<Status> {
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}`,
Expand All @@ -330,7 +330,9 @@ export async function deploy(action: ActionInterface): Promise<Status> {
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
Expand Down

0 comments on commit 2991688

Please sign in to comment.