diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index d17926e..6b6dfad 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -8,6 +8,7 @@ on: env: IMAGE_TAG: ${{ github.ref == 'refs/heads/dev' && 'dev' || 'latest' }} + REPO_URL: https://git.sky-net.it jobs: lint: @@ -19,7 +20,7 @@ jobs: run: | apk add --no-cache git git init - git remote add origin ${{ github.server_url }}/${{ github.repository }}.git + git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git git fetch --depth 1 origin ${{ github.ref }} git checkout FETCH_HEAD @@ -38,7 +39,7 @@ jobs: apt-get update apt-get install -y git git init - git remote add origin ${{ github.server_url }}/${{ github.repository }}.git + git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git git fetch --depth 1 origin ${{ github.ref }} git checkout FETCH_HEAD @@ -105,7 +106,7 @@ jobs: - name: Manual Git Checkout run: | git init - git remote add origin http://$(getent hosts server | awk '{ print $1 }')/${{ github.repository }}.git + git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git git fetch --depth 1 origin ${{ github.ref }} git checkout FETCH_HEAD @@ -114,6 +115,7 @@ jobs: - name: Login to registry run: echo "${{ secrets.REG_TOKEN }}" | docker login "${{ secrets.REGISTRY }}" -u "${{ secrets.REG_USER }}" --password-stdin + - name: Build image run: | docker buildx build --load \