🔧 chore(ci): update remote URL configuration in build workflow
- add REPO_URL environment variable for consistent repository URL usage - update git remote add commands to use the new REPO_URL variable for clarity
This commit is contained in:
parent
f7822786df
commit
db77892ea9
1 changed files with 5 additions and 3 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue