Skip to content

Commit

Permalink
add build cache for docker image and use itkavehome user for registry…
Browse files Browse the repository at this point in the history
… authentication
  • Loading branch information
toniGrabulosa committed Mar 7, 2024
1 parent 445d71f commit d64de39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy_new_image_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,24 @@ jobs:
id: prepare-outputs

run: |
echo "IMAGE_REPOSITORY=$(printf ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "IMAGE_REPOSITORY_LOWERCASE=$(printf ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: itkavehome
password: ${{ secrets.ITKAVEHOME_GITHUB_TOKEN }}

- name: Build&Push App container image
uses: docker/build-push-action@v4
with:
file: Dockerfile
push: true
tags: |
ghcr.io/${{ env.IMAGE_REPOSITORY }}:${{ env.TAG }}
ghcr.io/${{ env.IMAGE_REPOSITORY_LOWERCASE }}:${{ env.TAG }}
cache-from: type=registry,ref=ghcr.io/${{ env.IMAGE_REPOSITORY_LOWERCASE }}:build-cache
cache-to: type=registry,ref=ghcr.io/${{ env.IMAGE_REPOSITORY_LOWERCASE }}:build-cache

- name: Install Helm
uses: azure/setup-helm@v3
Expand Down

0 comments on commit d64de39

Please sign in to comment.