Skip to content

Commit a23e9fb

Browse files
authored
Merge pull request #20 from CoverGo/fix/image-tag-issue
fix(tag): missing image url
2 parents b455ac7 + da6d402 commit a23e9fb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.gflows/libs/job_version.lib.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,21 @@ steps:
5050
env:
5151
ghcr_versioned_tag: #@ tagging.with_registry(sections.cache_registry.url,sections.service.image_name,"${{ steps.version.outputs.app_version }}")
5252
ghcr_latest_tag: #@ tagging.with_registry(sections.cache_registry.url,sections.service.image_name,"latest")
53+
ghcr_master_tag: #@ tagging.with_registry(sections.cache_registry.url,sections.service.image_name,"master")
5354
#@ if hasattr(sections,"main_registry"):
5455
ali_cloud_versioned_tag: #@ tagging.with_registry(sections.main_registry.url,sections.service.image_name,"${{ steps.version.outputs.app_version }}")
5556
ali_cloud_latest_tag: #@ tagging.with_registry(sections.main_registry.url,sections.service.image_name,"latest")
57+
ali_cloud_master_tag: #@ tagging.with_registry(sections.main_registry.url,sections.service.image_name,"master")
5658
#@ end
5759
run: |
5860
5961
ali_cloud_tags=${ali_cloud_versioned_tag}
6062
ghcr_tags=${ghcr_versioned_tag}
61-
63+
6264
branch=$(git branch --show-current)
6365
if [[ "$branch" = 'main' || "$branch" = 'master' ]]; then
64-
ali_cloud_tags="${ali_cloud_tags},${branch}"
65-
ghcr_tags="${ghcr_tags},${branch}"
66+
ali_cloud_tags="${ali_cloud_tags},${ali_cloud_master_tag}"
67+
ghcr_tags="${ghcr_tags},${ghcr_master_tag}"
6668
fi
6769
6870
if [[ ${GITHUB_REF} == refs/tags/v* ]]; then

github-sample/workflows/build-publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,19 @@ jobs:
5353
env:
5454
ghcr_versioned_tag: ghcr.io/covergo/auth:${{ steps.version.outputs.app_version }}
5555
ghcr_latest_tag: ghcr.io/covergo/auth:latest
56+
ghcr_master_tag: ghcr.io/covergo/auth:master
5657
ali_cloud_versioned_tag: registry-intl.cn-hongkong.aliyuncs.com/covergo/auth:${{ steps.version.outputs.app_version }}
5758
ali_cloud_latest_tag: registry-intl.cn-hongkong.aliyuncs.com/covergo/auth:latest
59+
ali_cloud_master_tag: registry-intl.cn-hongkong.aliyuncs.com/covergo/auth:master
5860
run: |2
5961
6062
ali_cloud_tags=${ali_cloud_versioned_tag}
6163
ghcr_tags=${ghcr_versioned_tag}
6264
6365
branch=$(git branch --show-current)
6466
if [[ "$branch" = 'main' || "$branch" = 'master' ]]; then
65-
ali_cloud_tags="${ali_cloud_tags},${branch}"
66-
ghcr_tags="${ghcr_tags},${branch}"
67+
ali_cloud_tags="${ali_cloud_tags},${ali_cloud_master_tag}"
68+
ghcr_tags="${ghcr_tags},${ghcr_master_tag}"
6769
fi
6870
6971
if [[ ${GITHUB_REF} == refs/tags/v* ]]; then

0 commit comments

Comments
 (0)