From 5608fa778edf5d239753152e75276bb14b5e23d7 Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Fri, 11 Oct 2024 15:28:58 +0200 Subject: [PATCH] fix: release workflow is broken since several images Fixes #62 Signed-off-by: Jeff MAURY --- .github/workflows/release.yaml | 82 ++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 166e773..2f8d840 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,29 +32,18 @@ env: jobs: - build_and_release: - name: Build and Release ${{ matrix.build-image-name }} + tag: + name: Tagging runs-on: ubuntu-24.04 - strategy: - matrix: - include: - - containerfile: "./chat/base/Containerfile" - build-image-name: "ai-lab-playground-chat" - archs: amd64, arm64 - - containerfile: "./chat/vulkan/amd64/Containerfile" - build-image-name: "ai-lab-playground-chat-vulkan" - archs: amd64 - - containerfile: "./chat/vulkan/arm64/Containerfile" - build-image-name: "ai-lab-playground-chat-vulkan" - archs: arm64 - - containerfile: "./chat/cuda/amd64/Containerfile" - build-image-name: "ai-lab-playground-chat-cuda" - archs: amd64 + outputs: + githubTag: ${{ steps.TAG_UTIL.outputs.githubTag}} + imageVersion: ${{ steps.TAG_UTIL.outputs.imageVersion}} + imageVersionShort: ${{ steps.TAG_UTIL.outputs.imageVersionShort}} + steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch }} - - name: Generate tag utilities id: TAG_UTIL run: | @@ -69,19 +58,32 @@ jobs: echo "Tagging with ${{ steps.TAG_UTIL.outputs.githubTag }}" git tag ${{ steps.TAG_UTIL.outputs.githubTag }} - git push origin ${{ steps.TAG_UTIL.outputs.githubTag }} + git push origin ${{ steps.TAG_UTIL.outputs.githubTag }} - - name: Create Release - id: create_release - uses: ncipollo/release-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build: + name: Build and Release ${{ matrix.build-image-name }} + needs: tag + runs-on: ubuntu-24.04 + strategy: + matrix: + include: + - containerfile: "./chat/base/Containerfile" + build-image-name: "ai-lab-playground-chat" + archs: amd64, arm64 + - containerfile: "./chat/vulkan/amd64/Containerfile" + build-image-name: "ai-lab-playground-chat-vulkan" + archs: amd64 + - containerfile: "./chat/vulkan/arm64/Containerfile" + build-image-name: "ai-lab-playground-chat-vulkan" + archs: arm64 + - containerfile: "./chat/cuda/amd64/Containerfile" + build-image-name: "ai-lab-playground-chat-cuda" + archs: amd64 + steps: + - uses: actions/checkout@v4 with: - tag: ${{ steps.TAG_UTIL.outputs.githubTag }} - name: ${{ steps.TAG_UTIL.outputs.githubTag }} - draft: true - prerelease: false - + ref: ${{ needs.tag.outputs.githubTag }} + - name: Install qemu dependency run: | sudo apt-get update @@ -92,8 +94,8 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: ${{ matrix.build-image-name }} - tags: latest ${{ steps.TAG_UTIL.outputs.imageVersion }} ${{ steps.TAG_UTIL.outputs.imageVersionShort }} - labels: io.podman.ai-lab.version=${{ steps.TAG_UTIL.outputs.imageVersion }} + tags: latest ${{ needs.tag.outputs.imageVersion }} ${{ needs.tag.outputs.imageVersionShort }} + labels: io.podman.ai-lab.version=${{ needs.tag.outputs.imageVersion }} containerfiles: | ${{ matrix.containerfile }} context: ./chat @@ -114,14 +116,18 @@ jobs: image: ${{ steps.build-image.outputs.image }} tags: ${{ steps.build-image.outputs.tags }} registry: ghcr.io/${{ github.repository_owner }}/podman-desktop-extension-ai-lab-playground-images - - - name: id - run: echo the release id is ${{ steps.create_release.outputs.id}} - - - name: Publish release - uses: StuYarrow/publish-release@v1.1.2 + + release: + needs: [tag, build] + name: Release + runs-on: ubuntu-24.04 + steps: + - name: Create Release + id: create_release + uses: ncipollo/release-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - id: ${{ steps.create_release.outputs.id}} + tag: ${{ needs.tag.outputs.githubTag }} + name: ${{ needs.tag.outputs.githubTag }} \ No newline at end of file