Skip to content

Commit

Permalink
🔖 Updated build
Browse files Browse the repository at this point in the history
  • Loading branch information
abdheshnayak committed Feb 8, 2024
1 parent 75d699a commit e3e196f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,19 @@ jobs:
docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG" --push
- name: Build & Push Image
if: !(startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/'))
run: |
set +e
image_name="ghcr.io/${{ github.repository }}/${{matrix.app}}"
# - name: Build & Push Image
# if: startsWith(github.ref, 'refs/heads/release')
# run: |
# branch_name=${GITHUB_REF#refs/heads/}
# version_string="v${branch_name#release-}-nightly"
#
# docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t ghcr.io/kloudlite/web/${{matrix.app}}:$version_string --push
# docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t ghcr.io/kloudlite/web/${{matrix.app}}:commit-${GITHUB_SHA} --push
docker manifest inspect $image_name:$IMAGE_TAG
exit_status=$?
if [ $exit_status -eq 0 ]; then
[ "$OVERRIDE_PUSHED_IMAGE" = "false" ] && echo "image ($image_name:$IMAGE_TAG) already exists, and override image is disable, exiting" && exit 0
echo "image exists, but override pushed image is set to true. proceeding with building image"
fi
set -e
docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG"

0 comments on commit e3e196f

Please sign in to comment.