This commit is contained in:
@@ -85,54 +85,23 @@ jobs:
|
|||||||
id: build-push
|
id: build-push
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: molvaapp/test_deploy
|
IMAGE_NAME: molvaapp/test_deploy
|
||||||
IMAGE_TAG: latest
|
IMAGE_TAG: ${{ steps.git-metadata.outputs.GIT_TAG != "none" && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}
|
||||||
CONFIG_FILE: .build/config/staging.yaml
|
CONFIG_FILE: .build/config/staging.yaml
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
|
||||||
|
|
||||||
echo "=== STARTING DOCKER BUILD ==="
|
|
||||||
echo "Building $IMAGE_NAME:$IMAGE_TAG"
|
|
||||||
echo "Using config: $CONFIG_FILE"
|
|
||||||
|
|
||||||
# Explicit Docker setup
|
|
||||||
echo "Docker info:"
|
|
||||||
docker info
|
|
||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
--progress plain \
|
|
||||||
--no-cache \
|
|
||||||
--build-arg BUILD_LDFLAGS="-w -s" \
|
--build-arg BUILD_LDFLAGS="-w -s" \
|
||||||
--build-arg CONFIG_FILE_PATH=$CONFIG_FILE \
|
--build-arg CONFIG_FILE_PATH=$CONFIG_FILE \
|
||||||
-t $IMAGE_NAME:$IMAGE_TAG \
|
-t $IMAGE_NAME:$IMAGE_TAG \
|
||||||
-t $IMAGE_NAME:latest \
|
-t $IMAGE_NAME:latest \
|
||||||
. 2>&1 | tee build.log
|
.
|
||||||
|
|
||||||
echo "=== BUILD COMPLETE ==="
|
|
||||||
echo "Build log:"
|
|
||||||
cat build.log
|
|
||||||
|
|
||||||
docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest
|
docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest
|
||||||
|
|
||||||
echo "Pushing images..."
|
docker push $IMAGE_NAME:$IMAGE_TAG
|
||||||
docker push $IMAGE_NAME:$IMAGE_TAG 2>&1 | tee push.log
|
docker push $IMAGE_NAME:latest
|
||||||
docker push $IMAGE_NAME:latest 2>&1 | tee -a push.log
|
|
||||||
|
|
||||||
echo "=== PUSH COMPLETE ==="
|
|
||||||
echo "Push log:"
|
|
||||||
cat push.log
|
|
||||||
|
|
||||||
docker pull $IMAGE_NAME:$IMAGE_TAG
|
|
||||||
echo "Image verified in registry"
|
|
||||||
|
|
||||||
echo "Pushed image $IMAGE_NAME:$IMAGE_TAG and :latest"
|
echo "Pushed image $IMAGE_NAME:$IMAGE_TAG and :latest"
|
||||||
|
|
||||||
- name: Debug build-push step
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
echo "Build-push step status: ${{ steps.build-push.conclusion }}"
|
|
||||||
echo "Image TAG: ${{ steps.git-metadata.outputs.GIT_SHA }}"
|
|
||||||
echo "Version input: ${{ inputs.version }}"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
Reference in New Issue
Block a user