Skip to content

Ship action and container all in one repository. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Create major/minor tags'
description: 'Create a list of major and minor versions to tag from the current tag.'
name: 'Create major/minor tags for action'
description: 'Create a list of major and minor versions of the action to tag from the current tag.'
outputs:
original-tag:
description: 'Original tag name'
Expand Down
13 changes: 13 additions & 0 deletions .github/actions/generate-container-tags/action.yml
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'
20 changes: 20 additions & 0 deletions .github/actions/generate-container-tags/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/weierophinney/laminas-ci-matrix';

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.

Loading