Skip to content

Commit

Permalink
fix: release workflow is broken since several images
Browse files Browse the repository at this point in the history
Fixes #62

Signed-off-by: Jeff MAURY <[email protected]>
  • Loading branch information
jeffmaury committed Oct 11, 2024
1 parent 79cf63f commit 5608fa7
Showing 1 changed file with 44 additions and 38 deletions.
82 changes: 44 additions & 38 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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/[email protected]

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 }}

0 comments on commit 5608fa7

Please sign in to comment.