Add proxy for apk add
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build and Deploy to Kubernetes
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
- kub-stage
|
||||
|
||||
env:
|
||||
REGISTRY: 194.5.195.53:30080
|
||||
REGISTRY: gitea-svc:3000
|
||||
IMAGE_NAME: admin/backoffice
|
||||
|
||||
jobs:
|
||||
@@ -17,17 +17,25 @@ jobs:
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apk add --no-cache git
|
||||
run: |
|
||||
export http_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
export https_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
apk add --no-cache git
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.git .
|
||||
git log -1 --format="%H %s"
|
||||
|
||||
- name: Start Docker daemon
|
||||
- name: Start Docker daemon with insecure registry
|
||||
run: |
|
||||
mkdir -p /etc/docker
|
||||
echo '{"insecure-registries":["194.5.195.53:30080","gitea-svc:3000"]}' > /etc/docker/daemon.json
|
||||
cat > /etc/docker/daemon.json << 'DOCKER_EOF'
|
||||
{
|
||||
"insecure-registries": ["gitea-svc:3000"]
|
||||
}
|
||||
DOCKER_EOF
|
||||
|
||||
dockerd &
|
||||
for i in $(seq 1 30); do
|
||||
docker info >/dev/null 2>&1 && break || sleep 2
|
||||
@@ -36,6 +44,7 @@ jobs:
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
cd src/BackOffice
|
||||
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||
--build-arg HTTP_PROXY=http://proxyuser:87zH26nbqT2@46.249.98.211:3128 \
|
||||
|
||||
Reference in New Issue
Block a user