Skip to content

Commit

Permalink
Do the docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilosevic committed Oct 16, 2024
1 parent 732450c commit 7db05cc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 62 deletions.
6 changes: 3 additions & 3 deletions .github/build-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ build_and_push() {
echo "Image $image_name:$DOCKER_TAG already exists"
else
echo "Building image $image_name:$DOCKER_TAG"
echo docker build \
docker build \
--build-arg GIT_SHA=$CURRENT_SHA \
${from_image:+--build-arg FROM_IMAGE=$from_image} \
-t $image_name:$DOCKER_TAG \
-t $image_name:latest \
-f $dockerfile .
echo "Pushing image $image_name:$DOCKER_TAG"
echo docker push $image_name:$DOCKER_TAG
echo docker push $image_name:latest
docker push $image_name:$DOCKER_TAG
# echo docker push $image_name:latest
fi
}

Expand Down
39 changes: 20 additions & 19 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,29 @@ jobs:
docker-image: ${{ steps.build.outputs.docker-image }}
steps:
- uses: ./.github/actions/build-image
# - name: Fix permissions
# run: sudo chown ubuntu:ubuntu -R $(pwd)
- name: Fix permissions
shell: bash
run: sudo chown ubuntu:ubuntu -R $(pwd)

# - name: Checkout repository
# uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# - name: Log in to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build Docker images and output the image name
# id: build
# shell: bash
# run: |
# # Output the image name
# set pipefail
# DOCKER_CI_IMAGE=$(.github/build-docker-images.sh | tail -n 1)
# echo "DOCKER_CI_IMAGE $DOCKER_CI_IMAGE"
# echo "docker-image=$DOCKER_CI_IMAGE" >> "$GITHUB_OUTPUT"
- name: Build Docker images and output the image name
id: build
shell: bash
run: |
# Output the image name
set pipefail
DOCKER_CI_IMAGE=$(.github/build-docker-images.sh | tee /dev/tty | tail -n 1)
echo "DOCKER_CI_IMAGE $DOCKER_CI_IMAGE"
echo "docker-image=$DOCKER_CI_IMAGE" >> "$GITHUB_OUTPUT"
build-ttmlir:
needs: build-image
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/build-image.yml

This file was deleted.

0 comments on commit 7db05cc

Please sign in to comment.