diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f806d5a..f03498f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: fail-fast: false - steps: + steps: # Checkout push-to-registry action github repository - name: Checkout Push to Registry action uses: actions/checkout@v2 @@ -32,6 +32,14 @@ jobs: tags: ${{ env.IMAGE_TAGS }} oci: true + # Workaround bug where capital letters in your GitHub user name make it impossible to push to GHCR. + # https://github.com/macbre/push-to-ghcr/issues/12 + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@v5 + with: + string: ${{ env.IMAGE_REGISTRY }} + # Push the image to GHCR (Image Registry) - name: Push To GHCR uses: redhat-actions/push-to-registry@v2 @@ -39,7 +47,7 @@ jobs: with: image: ${{ steps.build_image.outputs.image }} tags: ${{ steps.build_image.outputs.tags }} - registry: ${{ env.IMAGE_REGISTRY }} + registry: ${{ steps.registry_case.outputs.lowercase }} username: ${{ env.REGISTRY_USER }} password: ${{ env.REGISTRY_PASSWORD }} extra-args: |