fix(ci): use different var
Some checks failed
CI Pipeline / Build and Push Docker Image (push) Failing after 18s

This commit is contained in:
Aleksandr Tcitlionok
2024-12-11 10:10:07 +00:00
parent 7c8ebc4bcd
commit 14d3f51029

View File

@@ -9,8 +9,7 @@ on:
- main
env:
GH_REGISTRY: ghcr.io
LOCAL_REGISTRY: ${{ vars.LOCAL_REGISTRY }}
IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY }}
IMAGE_NAME: ${{ github.repository }}
jobs:
@@ -25,24 +24,10 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Determine Registry
id: registry
run: |
if [[ "${{ github.repository }}" == *github.com* ]]; then
echo "REGISTRY=${{ env.GH_REGISTRY }}" >> $GITHUB_ENV
else
echo "REGISTRY=${{ env.LOCAL_REGISTRY }}" >> $GITHUB_ENV
fi
shell: bash
- name: Debug Registry
run: |
echo "Registry is set to: $REGISTRY"
- name: Log in to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
@@ -59,5 +44,5 @@ jobs:
with:
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}