build-labels 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/build-labels +1 -0
- data/lib/build-labels/command_github.rb +42 -0
- data/lib/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b40fe78c64ebbc93fe498d8415aca739d462836dfb8e419a02974d77811752ba
|
|
4
|
+
data.tar.gz: a866c5c4aa440bf270d21eab64d309e1440c23078d8234131a20bad9ef78d3ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69bdddfc86e1487cfc099aa7c971d89c3b25d2cb524cc8d9533e18f972102926ee2eb3599f3f0bad533b570431037d26bb01943a7b389ff07f4a0608a1b0c2f1
|
|
7
|
+
data.tar.gz: 6013f438c022272afba4ba84c0b4be1cab7de3179e9522844f625836a7d23fe108bc99a8f309b2969bda4eadd23b6299334fbe8a15cbb35bfc3925fd929f620d
|
data/bin/build-labels
CHANGED
|
@@ -8,6 +8,7 @@ require 'build-labels/command_line'
|
|
|
8
8
|
require 'build-labels/command_to_compose'
|
|
9
9
|
require 'build-labels/command_to_dockerfiles'
|
|
10
10
|
require 'build-labels/command_gitlab'
|
|
11
|
+
require 'build-labels/command_github'
|
|
11
12
|
require 'build-labels/command_cache'
|
|
12
13
|
require 'build-labels/command_print'
|
|
13
14
|
require 'build-labels/command_set_version'
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require_relative 'command_line'
|
|
2
|
+
|
|
3
|
+
BuildLabels::CommandLine::COMMANDS[:github] = Class.new do
|
|
4
|
+
def run(builder, params, compose_text)
|
|
5
|
+
builder.oc.vendor = 'GITHUB_SERVER_URL/$GITHUB_TRIGGERING_ACTOR'
|
|
6
|
+
builder.oc.authors = 'GITHUB_SERVER_URL/$GITHUB_TRIGGERING_ACTOR'
|
|
7
|
+
builder.oc.revision = '$GITHUB_SHA'
|
|
8
|
+
# builder.oc['ref.name'] = '$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME'
|
|
9
|
+
builder.oc.source = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY'
|
|
10
|
+
builder.oc.documentation = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY'
|
|
11
|
+
builder.oc.licenses = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY'
|
|
12
|
+
builder.oc.url = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY'
|
|
13
|
+
# builder.oc.title = '$CI_PROJECT_TITLE'
|
|
14
|
+
# builder.oc.created = '$CI_JOB_STARTED_AT'
|
|
15
|
+
# builder.oc.version = '$CI_COMMIT_REF_NAME' # $CI_COMMIT_TAG
|
|
16
|
+
|
|
17
|
+
builder.add_namespace :github, 'com.github.ci'
|
|
18
|
+
builder.github.user = '$GITHUB_SERVER_URL/$GITHUB_TRIGGERING_ACTOR'
|
|
19
|
+
# builder.github.email = '$GITLAB_USER_EMAIL'
|
|
20
|
+
# builder.github.tagorbranch = '$CI_COMMIT_REF_NAME'
|
|
21
|
+
builder.github.actionurl = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID'
|
|
22
|
+
builder.github.commiturl = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA'
|
|
23
|
+
builder.github.cijoburl = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs/$GITHUB_JOB'
|
|
24
|
+
builder.github.mrurl = '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/$GITHUB_PR_NUMBER${GITHUB_REF#refs/pull/}'
|
|
25
|
+
# builder.github.tag = '$CI_REGISTRY_IMAGE:$GITHUB_SHA'
|
|
26
|
+
builder.github.commit_branch = '$GITHUB_REF_NAME'
|
|
27
|
+
builder.github.commit_short_sha = '$GITHUB_SHA'
|
|
28
|
+
# builder.github.commit_timestamp = '$CI_COMMIT_TIMESTAMP'
|
|
29
|
+
# builder.github.pipeline_id = '$CI_PIPELINE_ID'
|
|
30
|
+
# builder.github.pipeline_iid = '$CI_PIPELINE_IID'
|
|
31
|
+
|
|
32
|
+
# org.opencontainers.image.title BUILDTITLE=$(echo $CI_PROJECT_TITLE | tr " " "_")
|
|
33
|
+
# org.opencontainers.image.description
|
|
34
|
+
# date '+%FT%T%z' | sed -E -n 's/(\+[0-9]{2})([0-9]{2})$/\1:\2/p' #rfc 3339 date
|
|
35
|
+
# org.opencontainers.image.created
|
|
36
|
+
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def help = 'Use GitHub CI variables'
|
|
40
|
+
end.new
|
|
41
|
+
|
|
42
|
+
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: build-labels
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.42
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Artyom B
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-02-
|
|
11
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -110,6 +110,7 @@ files:
|
|
|
110
110
|
- lib/build-labels.rb
|
|
111
111
|
- lib/build-labels/builder.rb
|
|
112
112
|
- lib/build-labels/command_cache.rb
|
|
113
|
+
- lib/build-labels/command_github.rb
|
|
113
114
|
- lib/build-labels/command_gitlab.rb
|
|
114
115
|
- lib/build-labels/command_line.rb
|
|
115
116
|
- lib/build-labels/command_print.rb
|