From aa65516e0fb370e8df9b86b2e07359f84b3c40b8 Mon Sep 17 00:00:00 2001 From: gmagnani Date: Thu, 12 Mar 2026 09:13:47 +0000 Subject: [PATCH] Build with redhat-actions --- .github/workflows/docker-build-and-push.yaml | 28 +++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 81abd06..0de4122 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -34,13 +34,23 @@ jobs: sudo apt-get update sudo apt-get install -y buildah - - name: Build image - run: | - cd ${GITHUB_WORKSPACE}/mlir0c2701f - buildah bud -t ${REGISTRY}/${IMAGE_NAME} -f Dockerfile . - - name: Push image - if: ${{ github.ref == 'refs/heads/main' }} - run: | - buildah login -u niccolon -p ${{ secrets.DOCKERHUB_TOKEN }} ${REGISTRY} - buildah push ${REGISTRY}/${IMAGE_NAME} + - name: Build Image + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ${{ env.IMAGE_NAME }} + tags: latest + containerfiles: | + ./mlir0c2701f/Dockerfile + context: ./mlir0c2701f + + - name: Push Image + if: github.ref == 'refs/heads/main' + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + registry: ${{ env.REGISTRY }} + username: niccolon + password: ${{ secrets.DOCKERHUB_TOKEN }}