build-labels 0.0.40 → 0.0.41

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f679c69f203e4894038df2ffa7ceea403ff9087cd264e81f572c6a85114c7bf3
4
- data.tar.gz: 270d0068937a2e81cfd09c9a6a9162da9583c07f40455cfa2fbaee372a54948e
3
+ metadata.gz: be21d7fb9cada1663dd9e872fa7564facd78359cd9334fe470561c4cda3538e3
4
+ data.tar.gz: 91642df688e7daa2eac491d418216c37246eb46275d374d6fa4e70f1e70f297a
5
5
  SHA512:
6
- metadata.gz: d14565fe71225c27ae10830f12f1f5c4375d43ff11a9461a55fc40cb54354aec9b5e6ba5137f920aee486ac1d66030d0bfa1e4464963e8e4c86e251e3a512fe6
7
- data.tar.gz: d0759970613912d51e4114bba2d2622da9d08a12afb23b26b2eb60e8d8e58c32b78b49807cbf6836d3172e071200c99c95633dbf69928b430e0f00729383cf5d
6
+ metadata.gz: 1e76bd27295709f7601a81f075276e235ead0ca0d8be3895691bf7cf8f84b44d7c57739f8c950d80fa941874310acfad598162a1c2b47b0dad4e6e42ce6c96af
7
+ data.tar.gz: 98bd1654307172d42fbf5f2a8445176dbbf409cfbe3d26da336745f5b1263bb97ebc3eee9a0c1c722a078093f58c059ee3be318f45192705cc197f910b566d1a
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
+ BuildHUBels::CommandLine::COMMANDS[:githab] = 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
@@ -1,5 +1,5 @@
1
1
  module BuildLabels
2
2
  class Builder
3
- VERSION = '0.0.40'
3
+ VERSION = '0.0.41'
4
4
  end
5
5
  end
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.40
4
+ version: 0.0.41
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-12 00:00:00.000000000 Z
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