mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2025-08-02 03:57:12 +07:00
Updated to use new strategies with controlled Docker environment.
This commit is contained in:
15
app/lib/docker.js
Normal file
15
app/lib/docker.js
Normal file
@ -0,0 +1,15 @@
|
||||
import Regex from './regex.js'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
export default class Dockerfile extends Regex {
|
||||
constructor (root = null) {
|
||||
root = path.join(process.env.GITHUB_WORKSPACE, root)
|
||||
|
||||
if (fs.statSync(root).isDirectory()) {
|
||||
root = path.join(root, 'Dockerfile')
|
||||
}
|
||||
|
||||
super(root, /LABEL[\s\t]+version=[\t\s+]?[\"\']?([0-9\.]+)[\"\']?/i)
|
||||
}
|
||||
}
|
23
app/lib/package.js
Normal file
23
app/lib/package.js
Normal file
@ -0,0 +1,23 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
export default class Package {
|
||||
constructor (root = './') {
|
||||
root = path.join(process.env.GITHUB_WORKSPACE, root)
|
||||
|
||||
if (fs.statSync(root).isDirectory()) {
|
||||
root = path.join(root, 'package.json')
|
||||
}
|
||||
|
||||
if (!fs.existsSync(root)) {
|
||||
throw new Error(`package.json does not exist at ${root}.`)
|
||||
}
|
||||
|
||||
this.root = root
|
||||
this.data = JSON.parse(fs.readFileSync(root))
|
||||
}
|
||||
|
||||
get version () {
|
||||
return this.data.version
|
||||
}
|
||||
}
|
34
app/lib/regex.js
Normal file
34
app/lib/regex.js
Normal file
@ -0,0 +1,34 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
export default class Regex {
|
||||
constructor (root = null, pattern) {
|
||||
root = path.join(process.env.GITHUB_WORKSPACE, root)
|
||||
|
||||
if (fs.statSync(root).isDirectory()) {
|
||||
throw new Error(`${root} is a directory. The Regex tag identification strategy requires a file.`)
|
||||
}
|
||||
|
||||
if (!fs.existsSync(root)) {
|
||||
throw new Error(`"${root}" does not exist.`)
|
||||
}
|
||||
|
||||
this.content = fs.readFileSync(root).toString()
|
||||
|
||||
let content = pattern.exec(this.content)
|
||||
if (!content) {
|
||||
this._version = null
|
||||
// throw new Error(`Could not find pattern matching "${pattern.toString()}" in "${root}".`)
|
||||
} else {
|
||||
this._version = content[1]
|
||||
}
|
||||
}
|
||||
|
||||
get version () {
|
||||
return this._version
|
||||
}
|
||||
|
||||
get versionFound () {
|
||||
return this._version !== null
|
||||
}
|
||||
}
|
33
app/lib/setup.js
Normal file
33
app/lib/setup.js
Normal file
@ -0,0 +1,33 @@
|
||||
import core from '@actions/core'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
export default class Setup {
|
||||
static debug () {
|
||||
// Metadate for debugging
|
||||
core.debug(
|
||||
` Available environment variables:\n -> ${Object.keys(process.env)
|
||||
.map(i => i + ' :: ' + process.env[i])
|
||||
.join('\n -> ')}`
|
||||
)
|
||||
|
||||
const dir = fs
|
||||
.readdirSync(path.resolve(process.env.GITHUB_WORKSPACE), { withFileTypes: true })
|
||||
.map(entry => {
|
||||
return `${entry.isDirectory() ? '> ' : ' - '}${entry.name}`
|
||||
})
|
||||
.join('\n')
|
||||
|
||||
core.debug(` Working Directory: ${process.env.GITHUB_WORKSPACE}:\n${dir}`)
|
||||
}
|
||||
|
||||
static requireAnyEnv () {
|
||||
for (const arg of arguments) {
|
||||
if (!process.env.hasOwnProperty(arg)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('At least one of the following environment variables is required: ' + Array.slice(arguments).join(', '))
|
||||
}
|
||||
}
|
135
app/lib/tag.js
Normal file
135
app/lib/tag.js
Normal file
@ -0,0 +1,135 @@
|
||||
import core from '@actions/core'
|
||||
import os from 'os'
|
||||
import { GitHub, context } from '@actions/github'
|
||||
|
||||
// Get authenticated GitHub client (Ocktokit): https://github.com/actions/toolkit/tree/master/packages/github#usage
|
||||
const github = new GitHub(process.env.GITHUB_TOKEN || process.env.INPUT_GITHUB_TOKEN)
|
||||
// Get owner and repo from context of payload that triggered the action
|
||||
const { owner, repo } = context.repo
|
||||
|
||||
export default class Tag {
|
||||
constructor (prefix, version, postfix) {
|
||||
this.prefix = prefix
|
||||
this.version = version
|
||||
this.postfix = postfix
|
||||
this._tags = null
|
||||
this._message = null
|
||||
this._exists = null
|
||||
}
|
||||
|
||||
get name () {
|
||||
return `${this.prefix.trim()}${this.version.trim()}${this.postfix.trim()}`
|
||||
}
|
||||
|
||||
set message (value) {
|
||||
if (value && value.length > 0) {
|
||||
this._message = value
|
||||
}
|
||||
}
|
||||
|
||||
async getMessage () {
|
||||
if (this._message !== null) {
|
||||
return this._message
|
||||
}
|
||||
|
||||
try {
|
||||
const changelog = await github.repos.compareCommits({ owner, repo, base: tags.data.shift().name, head: 'master' })
|
||||
|
||||
return changelog.data.commits
|
||||
.map(
|
||||
(commit, i) =>
|
||||
`${i + 1}) ${commit.commit.message}${
|
||||
commit.hasOwnProperty('author')
|
||||
? commit.author.hasOwnProperty('login')
|
||||
? ' (' + commit.author.login + ')'
|
||||
: ''
|
||||
: ''
|
||||
}\n(SHA: ${commit.sha})\n`
|
||||
)
|
||||
.join('\n')
|
||||
} catch (e) {
|
||||
core.warning('Failed to generate changelog from commits: ' + e.message + os.EOL)
|
||||
return `Version ${this.version}`
|
||||
}
|
||||
}
|
||||
|
||||
async getTags () {
|
||||
if (this._tags !== null) {
|
||||
return this._tags.data
|
||||
}
|
||||
|
||||
this._tags = await github.repos.listTags({ owner, repo, per_page: 100 })
|
||||
|
||||
return this._tags.data
|
||||
}
|
||||
|
||||
async exists () {
|
||||
if (this._exists !== null) {
|
||||
return this._exists
|
||||
}
|
||||
const currentTag = this.name
|
||||
const tags = await this.getTags()
|
||||
|
||||
for (const tag of tags) {
|
||||
if (tag.name === currentTag) {
|
||||
this._exists = true
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
this._exists = false
|
||||
return false
|
||||
}
|
||||
|
||||
async push () {
|
||||
let tagexists = await this.exists()
|
||||
|
||||
if (!tagexists) {
|
||||
// Create tag
|
||||
const newTag = await github.git.createTag({
|
||||
owner,
|
||||
repo,
|
||||
tag: this.name,
|
||||
message: this.message,
|
||||
object: process.env.GITHUB_SHA,
|
||||
type: 'commit'
|
||||
})
|
||||
|
||||
core.warning(`Created new tag: ${newTag.data.tag}`)
|
||||
|
||||
// Create reference
|
||||
let newReference
|
||||
try {
|
||||
newReference = await github.git.createRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: `refs/tags/${newTag.data.tag}`,
|
||||
sha: newTag.data.sha
|
||||
})
|
||||
} catch (e) {
|
||||
core.warning({
|
||||
owner,
|
||||
repo,
|
||||
ref: `refs/tags/${newTag.data.tag}`,
|
||||
sha: newTag.data.sha
|
||||
})
|
||||
|
||||
throw e
|
||||
}
|
||||
|
||||
core.warning(`Reference ${newReference.data.ref} available at ${newReference.data.url}` + os.EOL)
|
||||
|
||||
// Store values for other actions
|
||||
if (typeof newTag === 'object' && typeof newReference === 'object') {
|
||||
core.setOutput('tagname', this.name)
|
||||
core.setOutput('tagsha', newTag.data.sha)
|
||||
core.setOutput('taguri', newReference.data.url)
|
||||
core.setOutput('tagmessage', this.message)
|
||||
core.setOutput('tagref', newReference.data.ref)
|
||||
core.setOutput('tagcreated', 'yes')
|
||||
}
|
||||
} else {
|
||||
core.warning('Cannot push tag (it already exists).')
|
||||
}
|
||||
}
|
||||
}
|
72
app/main.js
Normal file
72
app/main.js
Normal file
@ -0,0 +1,72 @@
|
||||
import core from '@actions/core'
|
||||
import os from 'os'
|
||||
import Setup from './lib/setup.js'
|
||||
import Package from './lib/package.js'
|
||||
import Tag from './lib/tag.js'
|
||||
import Regex from './lib/regex.js'
|
||||
|
||||
async function run () {
|
||||
try {
|
||||
Setup.debug()
|
||||
Setup.requireAnyEnv('GITHUB_TOKEN', 'INPUT_GITHUB_TOKEN')
|
||||
|
||||
// Identify the tag parsing strategy
|
||||
const root = core.getInput('root', { required: false }) || core.getInput('package_root', { required: false }) || './'
|
||||
const strategy = (core.getInput('strategy', { required: false }) || '').trim().length > 0 ? 'regex' : ((core.getInput('strategy', { required: false }) || 'package').trim().toLowerCase())
|
||||
|
||||
// Extract the version number using the supplied strategy
|
||||
let version = core.getInput('root', { required: false })
|
||||
version = version === null || version.trim().length === 0 ? null : version
|
||||
|
||||
switch (strategy) {
|
||||
case 'docker':
|
||||
version = (new Dockerfile(root)).version
|
||||
break
|
||||
|
||||
case 'package':
|
||||
// Extract using the package strategy (this is the default strategy)
|
||||
version = (new Package(root)).version
|
||||
break
|
||||
|
||||
case 'regex':
|
||||
version = (new Regex(root, new RegExp(pattern, 'i'))).version
|
||||
break
|
||||
|
||||
default:
|
||||
core.setFailed(`"${strategy}" is not a recognized tagging strategy. Choose from: 'package' (package.json), 'docker' (uses Dockerfile), or 'regex' (JS-based RegExp).`)
|
||||
return
|
||||
}
|
||||
|
||||
core.setOutput('version', version)
|
||||
core.debug(` Detected version ${version}`)
|
||||
|
||||
// Configure a tag using the identified version
|
||||
const tag = new Tag(
|
||||
core.getInput('tag_prefix', { required: false }),
|
||||
version,
|
||||
core.getInput('tag_suffix', { required: false })
|
||||
)
|
||||
|
||||
// Check for existance of tag and abort (short circuit) if it already exists.
|
||||
if (await tag.exists()) {
|
||||
core.warning(`"${tag.name}" tag already exists.` + os.EOL)
|
||||
core.setOutput('tagname', '')
|
||||
core.setOutput('tagcreated', 'no')
|
||||
return
|
||||
}
|
||||
|
||||
// The tag setter will autocorrect the message if necessary.
|
||||
tag.message = core.getInput('tag_message', { required: false }).trim()
|
||||
await tag.push()
|
||||
} catch (error) {
|
||||
core.warning(error.message)
|
||||
core.setOutput('tagname', '')
|
||||
core.setOutput('tagsha', '')
|
||||
core.setOutput('taguri', '')
|
||||
core.setOutput('tagmessage', '')
|
||||
core.setOutput('tagref', '')
|
||||
core.setOutput('tagcreated', 'no')
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
346
app/package-lock.json
generated
Normal file
346
app/package-lock.json
generated
Normal file
@ -0,0 +1,346 @@
|
||||
{
|
||||
"name": "autotag-action",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.0.0.tgz",
|
||||
"integrity": "sha512-aMIlkx96XH4E/2YZtEOeyrYQfhlas9jIRkfGPqMwXD095Rdkzo4lB6ZmbxPQSzD+e1M+Xsm98ZhuSMYGv/AlqA=="
|
||||
},
|
||||
"@actions/github": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-1.0.0.tgz",
|
||||
"integrity": "sha512-PPbWZ5wFAD/Vr+RCECfR3KNHjTwYln4liJBihs9tQUL0/PCFqB2lSkIh9V94AcZFHxgKk8snImjuLaBE8bKR7A==",
|
||||
"requires": {
|
||||
"@octokit/graphql": "^2.0.1",
|
||||
"@octokit/rest": "^16.15.0"
|
||||
}
|
||||
},
|
||||
"@octokit/endpoint": {
|
||||
"version": "5.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.2.tgz",
|
||||
"integrity": "sha512-gRjteEM9I6f4D8vtwU2iGUTn9RX/AJ0SVXiqBUEuYEWVGGAVjSXdT0oNmghH5lvQNWs8mwt6ZaultuG6yXivNw==",
|
||||
"requires": {
|
||||
"deepmerge": "4.0.0",
|
||||
"is-plain-object": "^3.0.0",
|
||||
"universal-user-agent": "^3.0.0",
|
||||
"url-template": "^2.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"universal-user-agent": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz",
|
||||
"integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==",
|
||||
"requires": {
|
||||
"os-name": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/graphql": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz",
|
||||
"integrity": "sha512-XoXJqL2ondwdnMIW3wtqJWEwcBfKk37jO/rYkoxNPEVeLBDGsGO1TCWggrAlq3keGt/O+C/7VepXnukUxwt5vA==",
|
||||
"requires": {
|
||||
"@octokit/request": "^5.0.0",
|
||||
"universal-user-agent": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"@octokit/request": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.0.2.tgz",
|
||||
"integrity": "sha512-z1BQr43g4kOL4ZrIVBMHwi68Yg9VbkRUyuAgqCp1rU3vbYa69+2gIld/+gHclw15bJWQnhqqyEb7h5a5EqgZ0A==",
|
||||
"requires": {
|
||||
"@octokit/endpoint": "^5.1.0",
|
||||
"@octokit/request-error": "^1.0.1",
|
||||
"deprecation": "^2.0.0",
|
||||
"is-plain-object": "^3.0.0",
|
||||
"node-fetch": "^2.3.0",
|
||||
"once": "^1.4.0",
|
||||
"universal-user-agent": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"universal-user-agent": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz",
|
||||
"integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==",
|
||||
"requires": {
|
||||
"os-name": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/request-error": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz",
|
||||
"integrity": "sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig==",
|
||||
"requires": {
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"@octokit/rest": {
|
||||
"version": "16.28.7",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.7.tgz",
|
||||
"integrity": "sha512-cznFSLEhh22XD3XeqJw51OLSfyL2fcFKUO+v2Ep9MTAFfFLS1cK1Zwd1yEgQJmJoDnj4/vv3+fGGZweG+xsbIA==",
|
||||
"requires": {
|
||||
"@octokit/request": "^5.0.0",
|
||||
"@octokit/request-error": "^1.0.2",
|
||||
"atob-lite": "^2.0.0",
|
||||
"before-after-hook": "^2.0.0",
|
||||
"btoa-lite": "^1.0.0",
|
||||
"deprecation": "^2.0.0",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.uniq": "^4.5.0",
|
||||
"octokit-pagination-methods": "^1.1.0",
|
||||
"once": "^1.4.0",
|
||||
"universal-user-agent": "^3.0.0",
|
||||
"url-template": "^2.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"universal-user-agent": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz",
|
||||
"integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==",
|
||||
"requires": {
|
||||
"os-name": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"atob-lite": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
|
||||
"integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY="
|
||||
},
|
||||
"before-after-hook": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
|
||||
"integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A=="
|
||||
},
|
||||
"btoa-lite": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
|
||||
"integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"requires": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
|
||||
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
|
||||
},
|
||||
"deprecation": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||
},
|
||||
"end-of-stream": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
||||
"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
|
||||
"requires": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"execa": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"requires": {
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"requires": {
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"is-plain-object": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
|
||||
"integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==",
|
||||
"requires": {
|
||||
"isobject": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||
},
|
||||
"isobject": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
|
||||
"integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA=="
|
||||
},
|
||||
"lodash.get": {
|
||||
"version": "4.4.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
|
||||
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
|
||||
},
|
||||
"lodash.set": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
|
||||
"integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM="
|
||||
},
|
||||
"lodash.uniq": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
|
||||
"integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M="
|
||||
},
|
||||
"macos-release": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz",
|
||||
"integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA=="
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
||||
"requires": {
|
||||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"octokit-pagination-methods": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
|
||||
"integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"os-name": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
|
||||
"integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==",
|
||||
"requires": {
|
||||
"macos-release": "^2.2.0",
|
||||
"windows-release": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"p-finally": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||
"requires": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
||||
"requires": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||
},
|
||||
"universal-user-agent": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-2.1.0.tgz",
|
||||
"integrity": "sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q==",
|
||||
"requires": {
|
||||
"os-name": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"url-template": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz",
|
||||
"integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE="
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"windows-release": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz",
|
||||
"integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==",
|
||||
"requires": {
|
||||
"execa": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
}
|
||||
}
|
||||
}
|
22
app/package.json
Normal file
22
app/package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "autotag-action",
|
||||
"version": "1.0.2",
|
||||
"private": true,
|
||||
"description": "Automatically create a tag whenever the version changes in package.json",
|
||||
"main": "lib/main.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/butlerlogic/action-autotag.git"
|
||||
},
|
||||
"keywords": [
|
||||
"actions",
|
||||
"node",
|
||||
"setup"
|
||||
],
|
||||
"author": "ButlerLogic",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.2",
|
||||
"@actions/github": "^2.1.0"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user