Skip to content

Commit 892ebae

Browse files
authored
Merge pull request #1087 from kaleido-io/fix-docker-labels
Fix docker image labels
2 parents 6806a74 + b7fc287 commit 892ebae

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/docker_main.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
run: |
3333
RELEASE_TAG=$(curl https://api.github.com/repos/${{ github.repository_owner }}/firefly/releases/latest -s | jq .tag_name -r)
3434
BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER
35+
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
3536
echo ::set-output name=BUILD_TAG::$BUILD_TAG
37+
echo ::set-output name=BUILD_DATE::$BUILD_DATE
3638
3739
- name: Read manifest.json
3840
id: manifest
@@ -52,8 +54,12 @@ jobs:
5254
file: ./Dockerfile
5355
builder: ${{ steps.buildx.outputs.name }}
5456
push: true
57+
platforms: linux/amd64
5558
tags: ghcr.io/${{ github.repository_owner }}/firefly:${{ steps.build_tag_generator.outputs.BUILD_TAG }},ghcr.io/${{ github.repository_owner }}/firefly:head
56-
labels: commit=$GITHUB_SHA, build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ"), tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
59+
labels: |
60+
commit=${{ github.sha }}
61+
build_date=${{ steps.build_tag_generator.outputs.BUILD_DATE }}
62+
tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
5763
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache
5864
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache,mode=max
5965
build-args: |

.github/workflows/docker_release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ jobs:
4646
run: |
4747
echo "DOCKER_TAGS=${{ env.DOCKER_TAGS }},ghcr.io/${{ github.repository_owner }}/firefly:rc" >> $GITHUB_ENV
4848
49+
- name: Set build tag
50+
id: build_tag_generator
51+
run: |
52+
RELEASE_TAG=$(curl https://api.github.com/repos/${{ github.repository_owner }}/firefly/releases/latest -s | jq .tag_name -r)
53+
BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER
54+
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
55+
echo ::set-output name=BUILD_TAG::$BUILD_TAG
56+
echo ::set-output name=BUILD_DATE::$BUILD_DATE
57+
4958
- name: Read manifest.json
5059
id: manifest
5160
run: |
@@ -64,8 +73,12 @@ jobs:
6473
file: ./Dockerfile
6574
builder: ${{ steps.buildx.outputs.name }}
6675
push: true
76+
platforms: linux/amd64
6777
tags: ghcr.io/${{ github.repository_owner }}/firefly:${{ github.ref_name }},ghcr.io/${{ github.repository_owner }}/firefly:head,${{ env.DOCKER_TAGS }}
68-
labels: commit=$GITHUB_SHA, build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ"), tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
78+
labels: |
79+
commit=${{ github.sha }}
80+
build_date=${{ steps.build_tag_generator.outputs.BUILD_DATE }}
81+
tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
6982
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache
7083
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache,mode=max
7184
build-args: |

0 commit comments

Comments
 (0)