Skip to content

Commit 8b24f9d

Browse files
authored
fix: release workflow is broken since several images (#63)
Fixes #62 Signed-off-by: Jeff MAURY <jmaury@redhat.com>
1 parent a4abefa commit 8b24f9d

File tree

1 file changed

+44
-38
lines changed

1 file changed

+44
-38
lines changed

.github/workflows/release.yaml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,18 @@ env:
3232

3333
jobs:
3434

35-
build_and_release:
36-
name: Build and Release ${{ matrix.build-image-name }}
35+
tag:
36+
name: Tagging
3737
runs-on: ubuntu-24.04
38-
strategy:
39-
matrix:
40-
include:
41-
- containerfile: "./chat/base/Containerfile"
42-
build-image-name: "ai-lab-playground-chat"
43-
archs: amd64, arm64
44-
- containerfile: "./chat/vulkan/amd64/Containerfile"
45-
build-image-name: "ai-lab-playground-chat-vulkan"
46-
archs: amd64
47-
- containerfile: "./chat/vulkan/arm64/Containerfile"
48-
build-image-name: "ai-lab-playground-chat-vulkan"
49-
archs: arm64
50-
- containerfile: "./chat/cuda/amd64/Containerfile"
51-
build-image-name: "ai-lab-playground-chat-cuda"
52-
archs: amd64
38+
outputs:
39+
githubTag: ${{ steps.TAG_UTIL.outputs.githubTag}}
40+
imageVersion: ${{ steps.TAG_UTIL.outputs.imageVersion}}
41+
imageVersionShort: ${{ steps.TAG_UTIL.outputs.imageVersionShort}}
42+
5343
steps:
5444
- uses: actions/checkout@v4
5545
with:
5646
ref: ${{ github.event.inputs.branch }}
57-
5847
- name: Generate tag utilities
5948
id: TAG_UTIL
6049
run: |
@@ -69,19 +58,32 @@ jobs:
6958
7059
echo "Tagging with ${{ steps.TAG_UTIL.outputs.githubTag }}"
7160
git tag ${{ steps.TAG_UTIL.outputs.githubTag }}
72-
git push origin ${{ steps.TAG_UTIL.outputs.githubTag }}
61+
git push origin ${{ steps.TAG_UTIL.outputs.githubTag }}
7362
74-
- name: Create Release
75-
id: create_release
76-
uses: ncipollo/release-action@v1
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
build:
64+
name: Build and Release ${{ matrix.build-image-name }}
65+
needs: tag
66+
runs-on: ubuntu-24.04
67+
strategy:
68+
matrix:
69+
include:
70+
- containerfile: "./chat/base/Containerfile"
71+
build-image-name: "ai-lab-playground-chat"
72+
archs: amd64, arm64
73+
- containerfile: "./chat/vulkan/amd64/Containerfile"
74+
build-image-name: "ai-lab-playground-chat-vulkan"
75+
archs: amd64
76+
- containerfile: "./chat/vulkan/arm64/Containerfile"
77+
build-image-name: "ai-lab-playground-chat-vulkan"
78+
archs: arm64
79+
- containerfile: "./chat/cuda/amd64/Containerfile"
80+
build-image-name: "ai-lab-playground-chat-cuda"
81+
archs: amd64
82+
steps:
83+
- uses: actions/checkout@v4
7984
with:
80-
tag: ${{ steps.TAG_UTIL.outputs.githubTag }}
81-
name: ${{ steps.TAG_UTIL.outputs.githubTag }}
82-
draft: true
83-
prerelease: false
84-
85+
ref: ${{ needs.tag.outputs.githubTag }}
86+
8587
- name: Install qemu dependency
8688
run: |
8789
sudo apt-get update
@@ -92,8 +94,8 @@ jobs:
9294
uses: redhat-actions/buildah-build@v2
9395
with:
9496
image: ${{ matrix.build-image-name }}
95-
tags: latest ${{ steps.TAG_UTIL.outputs.imageVersion }} ${{ steps.TAG_UTIL.outputs.imageVersionShort }}
96-
labels: io.podman.ai-lab.version=${{ steps.TAG_UTIL.outputs.imageVersion }}
97+
tags: latest ${{ needs.tag.outputs.imageVersion }} ${{ needs.tag.outputs.imageVersionShort }}
98+
labels: io.podman.ai-lab.version=${{ needs.tag.outputs.imageVersion }}
9799
containerfiles: |
98100
${{ matrix.containerfile }}
99101
context: ./chat
@@ -114,14 +116,18 @@ jobs:
114116
image: ${{ steps.build-image.outputs.image }}
115117
tags: ${{ steps.build-image.outputs.tags }}
116118
registry: ghcr.io/${{ github.repository_owner }}/podman-desktop-extension-ai-lab-playground-images
117-
118-
- name: id
119-
run: echo the release id is ${{ steps.create_release.outputs.id}}
120-
121-
- name: Publish release
122-
uses: StuYarrow/publish-release@v1.1.2
119+
120+
release:
121+
needs: [tag, build]
122+
name: Release
123+
runs-on: ubuntu-24.04
124+
steps:
125+
- name: Create Release
126+
id: create_release
127+
uses: ncipollo/release-action@v1
123128
env:
124129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125130
with:
126-
id: ${{ steps.create_release.outputs.id}}
131+
tag: ${{ needs.tag.outputs.githubTag }}
132+
name: ${{ needs.tag.outputs.githubTag }}
127133

0 commit comments

Comments
 (0)