Skip to content

Commit

Permalink
Get only first 8 character of sha
Browse files Browse the repository at this point in the history
  • Loading branch information
trubbio83 authored and matteo-s committed Jun 20, 2024
1 parent cd78e01 commit 5032aa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/builder-tool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract the first 5 characters of the SHA
id: extract_sha
run: echo "SHA_SHORT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=ref,event=branch
type=raw,value=${{ github.sha }}
type=raw,value=${{ env.SHA_SHORT }}
labels: |
version=${{ github.sha }}
commit.sha=${{ github.sha }}
flavor: |
latest=true
- name: Build and push Docker image
Expand Down
2 changes: 1 addition & 1 deletion application/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ springdoc:
# Kaniko config
kaniko:
image: ${KANIKO_IMAGE:gcr.io/kaniko-project/executor:latest}
init-image: ${KANIKO_INIT_IMAGE:ghcr.io/scc-digitalhub/digitalhub-core-builder-tool:latest}
init-image: ${KANIKO_INIT_IMAGE:ghcr.io/scc-digitalhub/digitalhub-core-builder-tool:629755fe1a91cf9de6090dbaa2e1035c7b4d3da8}
image-prefix: ${KANIKO_IMAGE_PREFIX:dhcore}
image-registry: ${KANIKO_IMAGE_REGISTRY:${registry.name}}
secret: ${KANIKO_SECRET:${registry.secret}}
Expand Down

0 comments on commit 5032aa4

Please sign in to comment.