diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4025f32..2e9aaf2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 }}