fix(ci): use hardcoded 10.10.0.10:3000 for container registry
This commit is contained in:
@@ -129,15 +129,15 @@ jobs:
|
|||||||
|
|
||||||
BRANCH_TAG=$(echo ${GITHUB_REF_NAME} | sed 's/\//-/g')
|
BRANCH_TAG=$(echo ${GITHUB_REF_NAME} | sed 's/\//-/g')
|
||||||
SHA_SHORT=$(echo ${GITHUB_SHA} | cut -c1-7)
|
SHA_SHORT=$(echo ${GITHUB_SHA} | cut -c1-7)
|
||||||
REGISTRY_URL=$(echo ${GITHUB_SERVER_URL} | sed 's|.*://||')
|
# Gitea container registry is on HTTP at 10.10.0.10:3000
|
||||||
REGISTRY="${REGISTRY_URL}/${{ github.repository_owner }}"
|
REGISTRY="10.10.0.10:3000/${{ github.repository_owner }}"
|
||||||
|
|
||||||
# Build web image locally
|
# Build web image locally
|
||||||
docker build -f ./docker/Dockerfile.web -t mostovik-web:local .
|
docker build -f ./docker/Dockerfile.web -t mostovik-web:local .
|
||||||
docker save mostovik-web:local -o /tmp/web.tar
|
docker save mostovik-web:local -o /tmp/web.tar
|
||||||
|
|
||||||
# Push with crane (supports insecure HTTP)
|
# Push with crane (supports insecure HTTP)
|
||||||
./crane auth login ${REGISTRY_URL} -u ${{ gitea.actor }} -p ${{ gitea.token }}
|
./crane auth login 10.10.0.10:3000 -u ${{ gitea.actor }} -p ${{ gitea.token }}
|
||||||
./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:${BRANCH_TAG}
|
./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:${BRANCH_TAG}
|
||||||
./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:${BRANCH_TAG}-${SHA_SHORT}
|
./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:${BRANCH_TAG}-${SHA_SHORT}
|
||||||
|
|
||||||
@@ -158,5 +158,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Image summary
|
- name: Image summary
|
||||||
run: |
|
run: |
|
||||||
REGISTRY_URL=$(echo ${GITHUB_SERVER_URL} | sed 's|.*://||')
|
echo "Images pushed to 10.10.0.10:3000/${{ github.repository_owner }}/"
|
||||||
echo "Images pushed to ${REGISTRY_URL}/${{ github.repository_owner }}/"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user