-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
Combine container and action into single repository
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Create container tag list for current push' | ||
description: 'Creates a list of container tag names for the current tag' | ||
inputs: | ||
tag-ref: | ||
description: 'Git tag ref being created' | ||
required: true | ||
outputs: | ||
tags: | ||
description: 'Multiline string containing one string tag name per line.' | ||
|
||
runs: | ||
using: 'node12' | ||
main: 'index.js' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const core = require('@actions/core'); | ||
const semver = require('semver') | ||
|
||
const package = 'ghcr.io/laminas/laminas-continuous-integration'; | ||
|
||
let tagRef = core.getInput('tag-ref'); | ||
let tag = tagRef.split('/').pop(); | ||
|
||
let major = semver.major(tag); | ||
let minor = major + '.' + semver.minor(tag); | ||
let patch = minor + '.' + semver.patch(tag); | ||
|
||
let tags = [ | ||
package + ':' + major, | ||
package + ':' + minor, | ||
package + ':' + patch, | ||
]; | ||
|
||
core.info(`Tags: ${JSON.stringify(tags)}`); | ||
core.setOutput('tags', tags.join("\n")); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.