Skip to content

Commit

Permalink
Merge pull request #1087 from kaleido-io/fix-docker-labels
Browse files Browse the repository at this point in the history
Fix docker image labels
  • Loading branch information
nguyer authored Oct 5, 2022
2 parents 6806a74 + b7fc287 commit 892ebae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/docker_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
run: |
RELEASE_TAG=$(curl https://api.github.com/repos/${{ github.repository_owner }}/firefly/releases/latest -s | jq .tag_name -r)
BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo ::set-output name=BUILD_TAG::$BUILD_TAG
echo ::set-output name=BUILD_DATE::$BUILD_DATE
- name: Read manifest.json
id: manifest
Expand All @@ -52,8 +54,12 @@ jobs:
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/firefly:${{ steps.build_tag_generator.outputs.BUILD_TAG }},ghcr.io/${{ github.repository_owner }}/firefly:head
labels: commit=$GITHUB_SHA, build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ"), tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
labels: |
commit=${{ github.sha }}
build_date=${{ steps.build_tag_generator.outputs.BUILD_DATE }}
tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache,mode=max
build-args: |
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ jobs:
run: |
echo "DOCKER_TAGS=${{ env.DOCKER_TAGS }},ghcr.io/${{ github.repository_owner }}/firefly:rc" >> $GITHUB_ENV
- name: Set build tag
id: build_tag_generator
run: |
RELEASE_TAG=$(curl https://api.github.com/repos/${{ github.repository_owner }}/firefly/releases/latest -s | jq .tag_name -r)
BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo ::set-output name=BUILD_TAG::$BUILD_TAG
echo ::set-output name=BUILD_DATE::$BUILD_DATE
- name: Read manifest.json
id: manifest
run: |
Expand All @@ -64,8 +73,12 @@ jobs:
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/firefly:${{ github.ref_name }},ghcr.io/${{ github.repository_owner }}/firefly:head,${{ env.DOCKER_TAGS }}
labels: commit=$GITHUB_SHA, build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ"), tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
labels: |
commit=${{ github.sha }}
build_date=${{ steps.build_tag_generator.outputs.BUILD_DATE }}
tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/firefly:buildcache,mode=max
build-args: |
Expand Down

0 comments on commit 892ebae

Please sign in to comment.