34
All checks were successful
Deploy Production / Deploy to Staging (push) Has been skipped

This commit is contained in:
Alex Shevchuk
2025-08-19 02:41:28 +03:00
parent 74cd4463bf
commit ef1234cd93

View File

@@ -59,15 +59,6 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Verify required files exist
run: |
echo "Checking for config file..."
if [ ! -f ".build/config/staging.yaml" ]; then
echo "Error: staging.yaml not found!"
exit 1
fi
echo "All required files exist"
- name: Extract Git metadata - name: Extract Git metadata
id: git-metadata id: git-metadata
run: | run: |
@@ -90,22 +81,8 @@ jobs:
echo "Building image for ${{ inputs.environment }} environment" echo "Building image for ${{ inputs.environment }} environment"
echo "Git tag : ${{ steps.git-metadata.outputs.GIT_TAG }}" echo "Git tag : ${{ steps.git-metadata.outputs.GIT_TAG }}"
echo "Git sha : ${{ steps.git-metadata.outputs.GIT_SHA }}" echo "Git sha : ${{ steps.git-metadata.outputs.GIT_SHA }}"
echo "Image tag : ${{ steps.git-metadata.outputs.GIT_TAG != "none" && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}" echo "Image tag : '${{ steps.git-metadata.outputs.GIT_TAG != "none" && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}'"
IMAGE_TAG=${{ inputs.environment }}-${{ steps.git-metadata.outputs.GIT_TAG != "none" && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}
docker build \
--build-arg BUILD_LDFLAGS="-w -s" \
--build-arg CONFIG_FILE_PATH=$CONFIG_FILE \
-t $IMAGE_NAME:$IMAGE_TAG \
-t $IMAGE_NAME:latest \
.
docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest
docker push $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:latest
echo "Pushed image $IMAGE_NAME:$IMAGE_TAG and :latest"
- name: Install dependencies - name: Install dependencies
run: | run: |