Skip to content

Commit

Permalink
Move code to action
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilosevic committed Oct 16, 2024
1 parent c7a5536 commit 861cf58
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-image/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker
name: Build Docker Image
description: Build and Publish Docker Image
runs:
using: 'composite'
Expand All @@ -24,4 +24,4 @@ runs:
set pipefail
DOCKER_CI_IMAGE=$(.github/build-docker-images.sh | tail -n 1)
echo "DOCKER_CI_IMAGE $DOCKER_CI_IMAGE"
echo "docker-image=$DOCKER_IMAGE" >> "$GITHUB_OUTPUT"
echo "docker-image=$DOCKER_CI_IMAGE" >> "$GITHUB_OUTPUT"
39 changes: 20 additions & 19 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,29 @@ jobs:
outputs:
docker-image: ${{ steps.build.outputs.docker-image }}
steps:
- name: Fix permissions
run: sudo chown ubuntu:ubuntu -R $(pwd)
- uses: ./.github/actions/build-image
# - name: Fix permissions
# 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 | 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

0 comments on commit 861cf58

Please sign in to comment.