Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/build_docker_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,20 @@ jobs:
password: ${{ secrets.ACCESS_TOKEN }}

-
name: Build images
name: Build and push images
run: |
docker build . --tag ghcr.io/${{ github.repository_owner }}/monorepo-split:latest --build-arg commitHash=${{ github.sha }}
docker push ghcr.io/${{ github.repository_owner }}/monorepo-split:latest
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/monorepo-split"

# Build image
docker build . --tag ${IMAGE_NAME}:latest --build-arg commitHash=${{ github.sha }}

# If triggered by a tag, also tag the image with the version
if [[ "${{ github.ref_type }}" == "tag" ]]; then
docker tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:${{ github.ref_name }}
docker push ${IMAGE_NAME}:${{ github.ref_name }}
echo "✅ Pushed ${IMAGE_NAME}:${{ github.ref_name }}"
fi

# Always push latest
docker push ${IMAGE_NAME}:latest
echo "✅ Pushed ${IMAGE_NAME}:latest"
Loading