Skip to content

Commit

Permalink
generate a head tag for images
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaven committed Oct 31, 2023
1 parent 8c3b7de commit ad23220
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-geth-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
id: tag_sha
run: echo "tag=${{ steps.ghcr_repo.outputs.path }}:${{ steps.commit_sha.outputs.short }}" >> $GITHUB_OUTPUT

- name: Manually generate head tag
id: tag_head
run: echo "tag=${{ steps.ghcr_repo.outputs.path }}:head" >> $GITHUB_OUTPUT

- name: Manually generate ver tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
id: tag_ver
Expand All @@ -67,12 +71,13 @@ jobs:
push: true
tags: |
${{ steps.tag_sha.outputs.tag }}
${{ steps.tag_head.outputs.tag }}
labels: ${{ steps.meta.outputs.labels }}

- name: Create and push a manifest with ver referencing latest commit
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
docker buildx imagetools create \
-t ${{ steps.tag_ver.outputs.tag }} \
${{ steps.tag_sha.outputs.tag }}
${{ steps.tag_head.outputs.tag }}
14 changes: 12 additions & 2 deletions .github/workflows/build-sgx-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
id: tag_sha
run: echo "tag=${{ steps.ghcr_repo.outputs.path }}:${{ steps.commit_sha.outputs.short }}" >> $GITHUB_OUTPUT

- name: Manually generate head tag
id: tag_head
run: echo "tag=${{ steps.ghcr_repo.outputs.path }}:head" >> $GITHUB_OUTPUT

- name: Manually generate ver tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
id: tag_ver
Expand All @@ -68,14 +72,15 @@ jobs:
push: true
tags: |
${{ steps.tag_sha.outputs.tag }}
${{ steps.tag_head.outputs.tag }}
labels: ${{ steps.meta.outputs.labels }}

- name: Create and push a manifest with ver referencing latest commit
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
docker buildx imagetools create \
-t ${{ steps.tag_ver.outputs.tag }} \
${{ steps.tag_sha.outputs.tag }}
${{ steps.tag_head.outputs.tag }}
build_sgx_sol_dev:
Expand Down Expand Up @@ -119,6 +124,10 @@ jobs:
id: tag_sha
run: echo "tag=${{ steps.ghcr_repo.outputs.path }}:${{ steps.commit_sha.outputs.short }}" >> $GITHUB_OUTPUT

- name: Manually generate head tag
id: tag_head
run: echo "tag=${{ steps.ghcr_repo.outputs.path }}:head" >> $GITHUB_OUTPUT

- name: Manually generate ver tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
id: tag_ver
Expand All @@ -135,12 +144,13 @@ jobs:
push: true
tags: |
${{ steps.tag_sha.outputs.tag }}
${{ steps.tag_head.outputs.tag }}
labels: ${{ steps.meta.outputs.labels }}

- name: Create and push a manifest with ver referencing latest commit
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
docker buildx imagetools create \
-t ${{ steps.tag_ver.outputs.tag }} \
${{ steps.tag_sha.outputs.tag }}
${{ steps.tag_head.outputs.tag }}

0 comments on commit ad23220

Please sign in to comment.