Skip to content
Snippets Groups Projects
Commit db34db16 authored by Felix Wotschofsky's avatar Felix Wotschofsky Committed by GitHub
Browse files

Fix Docker build failing due to username casing

parent c217c653
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,11 @@ jobs: ...@@ -33,9 +33,11 @@ jobs:
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Version - name: Get Variables
id: get_version id: get-variables
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
echo ::set-output name=gh-username-lower::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
- name: Build and push Image - name: Build and push Image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
...@@ -43,9 +45,9 @@ jobs: ...@@ -43,9 +45,9 @@ jobs:
platforms: linux/amd64 platforms: linux/amd64
tags: | tags: |
${{ secrets.DOCKERHUB_USERNAME }}/libretranslate:${{ env.TAG }}, ${{ secrets.DOCKERHUB_USERNAME }}/libretranslate:${{ env.TAG }},
ghcr.io/${{ github.repository_owner }}/libretranslate:${{ env.TAG }} ghcr.io/${{ steps.get-variables.outputs.gh-username-lower }}/libretranslate:${{ env.TAG }}
push: true push: true
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
env: env:
TAG: ${{ startsWith(github.ref, 'refs/tags/') && steps.get_version.outputs.VERSION || 'latest' }} TAG: ${{ startsWith(github.ref, 'refs/tags/') && steps.get-variables.outputs.version || 'latest' }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment